The church is ruled by the Spirit of God and the saints are led by the Spirit of God (Romans 8:14). And Christ remains with his church even to the end of the world (Matthew 28:20).
But here is the task, to determine whether those whom you call the church are the church, or rather, whether after being in error all their lives they were at last brought back before they died. In the time of Elijah, everybody and everything in the public life of this people had so far fallen into idolatry that Elijah thought he alone was left; and yet, although kinds and priests and everything that could be called the people of the church of God was going to perdition, God had kept for himself seven thousand (1 Kings 19:18). But who saw them or knew them to be the people of God?
What happened in Christ's own time, when all the apostles fell away and he himself was denied and condemned by the whole people, and scarcely more than a Nicodemus, a Joseph, and the thief on the cross were saved? Were these then called the people of God? They were the remnant of the people, but they were not so called, and what was so called was no the people of God.
Who knows but that the state of the church of God throughout the whole course of the world from the beginning has always been such that some have been called the people and the saints of God who were not so, while others, a remnant in their midst, really were the people or the saints, but were never called so?
(On the Bondage of the Will, LW 33:85-86, by Martin Luther)
Remember, O Lord, your church. Deliver her from all evil, perfect her in your love, and from the four winds gather her, the sanctified, in your kingdom. Amen.
(All from Day by Day We Magnify You: Daily Readings for the Entire Year by Martin Luther)