added login-logout functionality