Refactor

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