Ensure that a user is logged in