Added function autentificate for mongodb
Added autentificate function for mongodb