fixing error in production
refactored user access control check for homepage