Altered the api to return success object on successful registration