getUserData in mainCtrl, service, and server