How Lincoln's Secretary of the Navy helped win the war