Updated service to register username and token.