added recognition if a user is logged in