In the Civil War case the States signed onto Constitutional government.
That constitutional government did not prohibit secession. Read what the states had to say when they ratified the Constitution:
Virginia
We the Delegates of the people of Virginia ... declare and make known that the powers granted under the Constitution, being derived from the people of the United States may be resumed by them whensoever the same shall be perverted to their injury or oppression, and that every power not granted thereby remains with them and at their will ...New York
We, the delegates of the people of the state of New York ... Do declare and make known ... That the powers of government may be reassumed by the people whensoever it shall become necessary to their happiness; that every power, jurisdiction, and right, which is not by the said Constitution clearly delegated to the Congress of the United States, or the departments of the government thereof, remains to the people of the several states, or to their respective state governments ...
Besides, if secession had been illegal, prosecuters would have had no problem convicting Jefferson Davis of treason. They didn't, because they couldn't.
"That constitutional government did not prohibit secession"....
Nor did it allow for it.
The States were bound by Article VI to uphold the Constitution. Secession without Federal judicial approval of its Constitutionality, as well as the creation of an Amendment to validate it, is insurrection.
...and an insurrection they had...and now we live with the results.
That's ridiculous. Davis wasn't tried because Chief Justice Chase, who was responsible for the federal circuit that included Virginia, made it clear that be believed that trying Davis would violate his 5th Amendment rights. Absent Chase's opinions then the government would have had no problem convicting Davis of anything they wanted to convict him of.