Moved register function to authenticate service. Fixed bug with registered users not being cached after registration.