Don't use window.location.origin

refs #30