Checks if user is logged in