Avoids a race condition when multiple server instances are backed by the MongoDB database. MongoDB does not have transactions, atomic upserts are used instead.
Merge pull request #202 from DanielDent/master

Avoids a race condition during 3rd party login services configuration