Added logging in more places, returning null when auth-error on mongoclient, #890