fixed baseRoute() such that it automatically excludes window.location.origin