Fix deprecation warnings related to MongoDB authentication