Updated login-logout stuff