Start refactoring SAML handling.