Added code to ensure that Mongo indexes exist. This takes care of the
case where we start from an empty database and use the user model
initializer.