Why window.location.origin?

One thing I forgot to mention that we've done on other projects is to create a common getUrl() function that maps names of endpoints + parameters to url strings.  There's a decent example in main.js in v1 of this project.  It has several advantages:
* It makes it easy to see all the endpoints we're using in one place, so keeping server-side url structure in sync with the client becomes much easier
* Refactoring url names/structure becomes much easier because again it's all in one place
* Finding everything that uses an endpoint can usually be done using grep

Of course, this only works if _every_ url in the app passes through the getUrl function, so if we're going to do it we should start now.