Refactored user management