Fixes for problems ocuring on first login with saml