Recently I was thinking about HTTP authentication and how to log out, and I came up with what I think is a good UI for it.
When someone logs in to a site using HTTP authentication, the word "Username:" and the username are displayed in a box at the right of the address bar, near where the lock icon is in Firefox (and Opera?). They're visually distinct, probably with a border and differently colored background. When the user wants to log out again, they click or right click on the username and are given a menu with the option to log out.
This has two advantages. First, it's (IMO) good UI. It's easily accessible, but it's not in the way (if it's too long it can be shortened by cutting out the middle, with the whole thing displayed in a tooltip or by expanding the box when hovered). Second, it can help prevent phishing attacks of the form http://www.somebank.com@evilphishingsite.net/, since www.somebank.com is moved away and all that's displayed in the normal location for URLs is http://evilphishingsite.net/.