Under the Confederation, their bailiff held a castle on the right bank of the Limmat, controlling access to the bridge. The Swiss Diet met at Baden repeatedly from 1426 to about 1712, making Baden a kind of capital for Switzerland. The Town Hall ('), where the Diet met, can still be visited. Over the course of the 15th century, the town regained its popularity as a Spa Resort ('). The town was the site of a famous debate on transubstantiation from May 21 to June 18, 1526. Although Zwingli refused to attend in person, he printed broadsheets throughout its duration and sent his assistant Johannes Oecolampadius to debate Johann Eck and Thomas Murner. In the end, a majority decided against the reformers but a substantial bloc emerged on their behalf as well. Johann Pistorius held a disputation in the city in 1589. Stein was refortified sometime between 1658 and 1670 but the fortress was abandoned in 1712. In 1714, the treaties of Rastatt and Baden ended hostilities between France and the Habsburgs, the last theater of the War of the Spanish Succession. Another Treaty of Baden ended the Toggenburg War among the Protestant and Catholic Swiss cantons in 1718. Baden was the capital of the canton of Baden from 1798 until 1803, when the canton of Aargau was created.