Updated serverBaseUrl and serverUrl to make them adaptable

I was running into some trouble when running the app in certain env., so I  added the 'window.location.host' to make the base path adaptable. (Let me know if you think this is a bad practice for some reason)