How the most unpopular US president got reelected