Add wrapper to set SCRIPT_NAME from proxy header
User url_for instead of hard-coding path for redirects
Use url_for for static files and logout and index links on base template
Use url_for to generate links