Login bugfix

Fixed a rather embarrassing security hole caused by the login form not
checking that a user was already logged in.
When logged in as a privaleged user, if logging in again as a user with
less permissions would have elevated permissions caused by the session
not being fully refreshed.
This has been fixed by not showing the login form when a user is
already logged in. Additionally, when authenicate is called, the
previous session data is destroyed when the new session id is generated.