Fix issue 652

We shouldn't add a failed user into the database.