finish login-logout