title: PyMongo authentication failing
body: <p>I set up a database with mongolab where the db had the same name as the collection. I decided I didnt like this deleted it and made a better naming scheme. I added a new user/password to for the new db and tried to authenticated. It keeps failing. Not sure why. I have double check my credentials and they are correct. I have checked the URI that mongolab provides and that is correct also. This code worked well for the first db. </p>
  
  <p>this is my login code</p>
  
  <pre><code>def __init__(self, user_id, password, database, collection):
          # mongodb://&lt;dbuser&gt;:&lt;dbpassword&gt;@ds017205.mlab.com:17205/words
          mongodb_uri = "mongodb://" + user_id + ":" + password + "@ds017205.mlab.com:17205/" + database
          client = pymongo.MongoClient(mongodb_uri)
          db = client[database]
          self.collection = db[collection] # is declared in class
  </code></pre>
  
  <p>this generates the following errors</p>
  
  <pre><code>Error
  Traceback (most recent call last):
    File "C:\Users\Austin\PycharmProjects\Words\test_mongodb.py", line 15, in testUpdate
      results = self.mongodb_obj.update(test)
    File "C:\Users\Austin\PycharmProjects\Words\mongodb.py", line 38, in update
      upsert=True
    File "C:\Python33\lib\site-packages\pymongo\collection.py", line 2235, in update
      with self._socket_for_writes() as sock_info:
    File "C:\Python33\lib\contextlib.py", line 48, in __enter__
      return next(self.gen)
    File "C:\Python33\lib\site-packages\pymongo\mongo_client.py", line 718, in _get_socket
      with server.get_socket(self.__all_credentials) as sock_info:
    File "C:\Python33\lib\contextlib.py", line 48, in __enter__
      return next(self.gen)
    File "C:\Python33\lib\site-packages\pymongo\server.py", line 152, in get_socket
      with self.pool.get_socket(all_credentials, checkout) as sock_info:
    File "C:\Python33\lib\contextlib.py", line 48, in __enter__
      return next(self.gen)
    File "C:\Python33\lib\site-packages\pymongo\pool.py", line 541, in get_socket
      sock_info.check_auth(all_credentials)
    File "C:\Python33\lib\site-packages\pymongo\pool.py", line 306, in check_auth
      auth.authenticate(credentials, self)
    File "C:\Python33\lib\site-packages\pymongo\auth.py", line 436, in authenticate
      auth_func(credentials, sock_info)
    File "C:\Python33\lib\site-packages\pymongo\auth.py", line 416, in _authenticate_default
      return _authenticate_scram_sha1(credentials, sock_info)
    File "C:\Python33\lib\site-packages\pymongo\auth.py", line 216, in _authenticate_scram_sha1
      res = sock_info.command(source, cmd)
    File "C:\Python33\lib\site-packages\pymongo\pool.py", line 213, in command
      read_concern)
    File "C:\Python33\lib\site-packages\pymongo\network.py", line 99, in command
      helpers._check_command_response(response_doc, None, allowable_errors)
    File "C:\Python33\lib\site-packages\pymongo\helpers.py", line 196, in _check_command_response
      raise OperationFailure(msg % errmsg, code, response)
  pymongo.errors.OperationFailure: Authentication failed.
  </code></pre>
  
  <p>Help with this would be appreciated. Thanks</p>