Federated login with multiple mails

This patch solve the problem of authentication using SAML when the IdP return multiple mails.

Close bug: #1691