Improve checkUserLoggedIn function in user.helpers.ts to return the full user object to reduce database calls