Moved register function from controller to UserServices