But there was a war. Under the circumstances -- a state government gone into rebellion and taking up arms against the rest of the country -- West Virginia statehood wasn't much of a problem. When the state government was shooting at the rest of the country it was natural that an alternative "loyal" government would be set up, and West Virginia statehood got the approval of the state government that wasn't shooting at the constitutional federal government.
There was a question, though, of whether areas that didn't want to be included in the new state should have been part of it. And why is it worse when a state is broken up? If breaking up the union had been debated in congress or in a national convention, state borders might have been changed to accomodate areas like West Virginia or east Tennessee that weren't keen on secession.
The only legal secession is the one that succeeds, and the only "illegal" one is the one that fails.
This question of "legal" and "illegal" secession is a little beside the point. If there's a prescribed means of exiting some political union, we can talk of "legal" secession. If there isn't, an arranged separation by mutual consent would also be "legal."
In the absence of an authorized means of exit or separation, force may very well decide things. I don't think we should say that force should always be the arbiter of what's legal or constitutional and what isn't. That's why we probably want to avoid unilateral secession in favor of a settlement negotiated beforehand by the parties concerned.
Unfortunately, by the time secession or separation becomes a real possibility, people are so angry that they don't want to have negotiations or ask for consent. The act of declaring oneself independent on one's own comes to have great satsifaction for people.
Jailing politicians and some of the other things were definitely unconstitutional
but were they necessary?