Moved user functions to new file 'UserController'.