fixed issue with database class when not using a replica set.
Fixed authentication suddenly not working.