Sometimes I log out of a web page or app by clicking on a specific logout link. Other times I may be in a rush so I just close the browser. Is there a benefit to formally logging out? Is shutting down the browser less secure? 
Is there a difference between a formal logout and shutting down the browser?
login;authentication
There's too much variation in how web apps implement user authentication to answer this. Some will delete the cookies they've created; some will destroy the session variables that are associated with your account and your current browsing...session; others will just redirect you to a login page.When I build web apps with user authentication, the user is generally associated with a session cookie, i.e., a cookie that isn't written to disk but which goes away when the browser is closed. So, in this case, clicking a logout link and closing the browser does essentially the same thing.That said, it's possible on some web apps that your login is associated with a persistent cookie, or your IP address, or whatever, and just closing the browser won't log you out. In such a case it's conceivable that someone could come along after you, re-open the browser, and be logged in as you.All that said, I'd say that it's good practice to log out of a web app, but if you forget it's not really a big deal.