refactored user management