If belief in God produced moral behavior, Islam would be paradise on earth. If belief in Jesus produced moral behavior the atrocities of the middle ages would not have happened.
When I refer to God, I speak of the Judeo-Christian diety, not the moon god of Mecca. Yet even Islam produced more moral behavior than the brutal despots it displaced. There was a time in History where Islam was actually a force for relative justice. As soon as it tried conclusions with Christianity, it was turned back. The better yields to the best.
As for your last point, the 'atrocities of the middle ages', while horrific, are lesser in magnitude and multitude than those of our modern 'enlightened' times. They are also less when compared to the barbarism of the times. However bad times were, they would have been worse if Christianity had not taken root. No force on Earth, relative to the strength it possessed, has been so restrained and beneficial to mankind as Christiandom.