Refactored usermanagement