Fixing issues deploying in a subdirectory #82

* Simplify .htaccess and add RewriteBase directive
  This needs to be customized to your deployment base directory
* Pass base url etc to a js variable and save this in App.config
* Use App.config or window.config for api calls and oauth redirects
* Update template helpers to use App.config for urls