User api client in javascript