loggin out database
handling mongod uris