validating user is logged in