fixing isloggedin