Was Southern secession legal?

Posted 6 years.