Faster query and better logging for deduplicate_users command.
Merge pull request #849 from kmaglione/deduplicate_users-stuff

Faster query and better logging for deduplicate_users command.