Better handling for login and logout.

 * Logging in will send you to the project page, unless you're going back to the VM.
 * Logging out will clear the DIT4C cookie so you're actually logged out.