api url taken out of config.js, determined from window.location.host instead.