Implemented authentication by mongo_uri
Get database name from uri, not using tricks