only attempt to authenticate to mongodb if pwd supplied