Database close must be asynchronous
Close procedure for ConnectionManager
Add replica set management and fix authentication