added support for authenticated mongodb connnections with username and password