added return function for isloggedin