added autentificate for mongodb

Added autentificate method for mongodb connections.