which American military leader became a national hero because of his victory at the battle of New Orleans an was later elected president