James Loewen is a fine historian and I recommend his book "The Confederate and Neo-Confederate Reader". This is a collection of statements made by southern leaders before, during, and after the Civil War explaining their participation (or opposition) to the secession campaign and the post-Civil War continuing resistance to racial equality. He demonstrates clearly that the southern leadership thought that the war was about slavery. After the war, when they had been forced by military defeat to accept that slavery was dead, they then turned to the issue of white supremacy, saying that they had been engaged in a crusade to ensure that America remained a "white man's country". They then raised the point of states' rights, because with the federal government having at least a lukewarm commitment to racial equality under Republican administrations (most of the rest of the 19th century), the southerners needed more autonomy for state governments in order to impose their vision of a white-dominated political and economic system.
Loewen's point about states' rights is that, before the Civil War, the southerners had a great degree of control over the federal government. They were _opposed_ to states' rights because the northern states were trying to use their own autonomy to hinder federal enforcement of the Fugitive Slave Act. The northern states were arguing that they had the right to decide who was a citizen of their state, and if a slave made it to the north the northern states wanted to prevent their master from being able to take them back. The south used its influence in the federal government to try to force the northern states to give back runaway slaves. Federal enforcement was pretty ineffective, and the southerners were outraged at the way northern states were subverting federal law. In 1857, the pro-southern majority on the Supreme Court decided the case of Dred Scott, a Missouri slave who sued for freedom on the grounds that he had been taken to a free state, Illinois, as well as free territories, by his master. The Court held that Scott's master retained property rights in him despite laws to the contrary that said that slaves could not be brought into free territory. This was a direct blow at the right of northern states to outlaw slavery in their own territory.
The truth is that states' rights is not an invariable principle in American politics. Support or opposition to states' rights depends entirely on what the states are trying to do and on how much power the group making the argument has in the federal and state governments. For example, when states began legalizing marijuana for medical use in the 1990s, liberals mostly supported states' rights, at least as regards medical marijuana. But when states wanted to outlaw gay marriage, then liberals pointed out that the constitution requires that each state give "full faith and credit" to the public acts (presumably including marriages) of other states. Conservatives supported states' rights to outlaw gay marriage but opposed states' rights to decide what drugs doctors could prescribe. And so forth - anybody who follows American politics can come up with a dozen more examples without having to stop for breath.
"There is no substitute for victory"
Depends on how you define victory.