Class and helper functions used in user management