Fix authentication

This was broken as of the update to express 4
in commit 6888833.

This bug did not harm security, every user -
even the ones with valid credentials - were
identified as guests.
Support deterministic output

This allows for caching of responses by a reverse proxy.