Use expected restcontroller exceptions during authentication.

[Finishes #58573138]