Authenticate the user before saving it
Merge pull request #1335 from winzou/fix/user

[Core] Authenticate the user before saving it