bug-fix: use the remoteUrl from config in the api

`api.js` has the global registry hard-coded. This PR uses the `remoteUrl` from the config instead.