Romans 13 and Just Rebellion

How should Romans 13's message of being subject to governments be understood in the light of governments like the nazi party or the Syrian dictatorship that toppled a couple days ago?

Did God ordain these horrible things? Why? Does this support leaders who claim "divine right to rule?" If a rebellion topples their government and becomes the new ruling body are they not also ordained by God to rule?

How bad can a government get before people are allowed to take up arms against it? Surely it must have been just to stop at nothing to destroy nazis and other governments who would murder and torture men, women, and children, right?