Moved user functionality to its own module.