added true and false conditions to setLoginStatus