* Refactored common user management code