Fix whereby baseUrl and restBaseUrl were computed incorrectly due to a fragment in window.href.