Still more fixes to auth middleware and base functionality.
Merge pull request #5 from EOxServer/master-fix-pdp-2

Still more fixes to auth middleware and base functionality.