Who was the president won the civil war and ended slavery?