Alonzo Fyfe of Athiest Ethicist recently addressed the proper way to counter the tired "Hitler and Stalin were atheists" arguments. Fyfe correctly argues that finding evidence that Hitler and Stalin were actually theists is irrelevent. In reality, it's just the same flawed argument in reverse or like saying all theists are bad because of the Crusades and the Inquisition. Instead, Fyfe takes the following tack:
My sound-byte answer: "I'm sorry, but blaming me for the crimes of Hitler and Stalin is like blaming the Amish – or blaming you, by honorable adversary – for 9-11.”
If my opponent will grant me a few more seconds, I would add, “You would certainly object if I were to accuse you of being responsible for these crimes. You would scream that any who would make such an assertion is bigoted and unjust. You would be right. Such a person is, in fact, bigoted and unjust. So is the person who blames all atheists for the crimes of Stalin.”
It's an excellent read, and I encourage you to read it. It's probably the best counter I've ever found to the Hitler and Stalin argument.