Adds a user to a mongodb database.