They simply wanted to be left alone, they did not seek to overthrow the federal government, nor oust Lincoln from office. The states constituting the Confederacy seceded and resumed their powers of self-government, certainly legal absent ANY prohibition to the contrary. Their citizens met in convention and voted to rescind their ratifications - it was not simply a legislative act, it was an act of republican governments expressing their sovereign rights.
There are certainly those who would dispute the 'absent ANY prohibitions' part, but it doesn't change the fact that in leaving you seized property and facilities that did not belong to you and chose to fire on those that the Lincoln administration insisted on holding on to. You initiated the war. I'm sorry that things didn't turn out to your liking but wars are like that.