authenticate(): remove a no-op stmt after "throw"
authenticate(): remove a single-use variable
authenticate(): justify switch blocks

Rewrite the first switch block to convert the outer "if" into a "case"
(also saves one indentation level). Remove the extra parentheses in the
second switch block and split a case condition into two.
initial SAML authentication support (#811)
add some finish to the new SAML code

* authenticate(): call authenticated_via_saml() only once and handle its
  failure properly
* authenticated_via_saml(): simplify some code
* saml_getAttributeValue(): idem
authenticate(): add some comments