Refactor

A massive refactor that includes:

* all configuration set through nginx variables
* whitelist and blacklist
* optional debug logging
* optional body filter to inject a header div with auth details