implemented isloggedin function for UsersTable