added reverse_proxied class

url_for generates leading slash for any url, which makes it
an absolute path that can not be overwritten by any HTML HEAD BASE
tag or HTTP Header settings. The reverse_proxied class makes the
app aware of proxy location. Tested with nginx.
fixed error when clicking login link
Merge pull request #13 from gffs/master

added reverse_proxied class