Moved the is_logged_in checker to the constructor