Add logout() function to login page

I don't know if loading a different URL in the browser will cause a
problem, but I think it should be fine given that the login() function
loads the login URL before doing anything else.