Manually merged updates from
https://github.com/pitbulk/apps/tree/master/user_saml
Cleaned up a bit