added setLoginStatus method