[WIP] Gateway SAML functionality