update endpoint in js and return for signin