Added somewhat login-logout, tiny cleanup.