Allow users to use a custom auth realm, and default to a better one

cc @joehoyle #reviewmerge

If you haven't switched WPR over yet, then Tapestry is the only thing affected here.