added a user_logged_in static variable, guess what it does