Framework for managing user accounts