Fix some eunit test failures
Fix bugs found running client tests
Add config file and template entries for rewrite and auth modules
Dialyzer fixes and cleanup