changed handling for baseurl in app.js