Revert "Revert "Don't require authentication for most pages.""

This reverts commit bb63dc7ff3f215fbe44b583419451fb34f287a6b.
This change was wrong.
Fix various aspects of the auth implementation.