Mashiach is coming to establish Hashem's kingship over the entire world. If one is going to rebel, so he will be kicked out and won't be allowed to stay and mess it up for everyone else. A situation like this is meant to test certain individuals who need to have their position clarified. This is part of the Great Birur of the Final Days.
Someone close to me gave a dvar Torah in which he explained how a birur is like sifting flour (davka "flour" with regard to Pesach!). Anyway, he said that the fine flour falls through to the bottom while the foreign substances get stuck inside the sifter which is lifted up above the fine flour which fell through. In this position, those things which are being sifted and separated and clarified as to whether it is part of the flour or something foreign believes that it is superior to the fine flour since it is raised above it, but it just doesn't know that it has been left behind and is destined to be thrown away as useless.
This is applicable to those who are perceived as "leaders" today, lifted up above the people who are considered "lowly" by them, of whom the Holy GRA said they are the Erev Rav.
Hashem wants to know who is faithful and loyal to Him, not submitting to any authority other than Torah, worshiping no other god but Hashem, who, despite personal failings and shortcomings, desires to see the Beit Hamikdash rebuilt and to see the entire world recognize His Kingship over His creation.
Yechezkel 20: 38 -- And I shall separate from you those who rebel and those who transgress against Me; from the land of their sojournings I shall take them, but to the land of Israel they shall not come, and you will know that I am the Lord.
So whenever hard situations develop, just remember that it is just a test, a necessary part of the process of birur. Never forget that Hashem knows it all and sees it all and has ultimate control over events. Trust Him to be in charge and believe that it is all for our ultimate good.