refactored current user and root page code"