Loewen is one of several historians who believe that James Buchanan, who served from 1857 to 1861, was in fact our first gay president. He is the only president to have remained a bachelor throughout his life. (His niece, Harriet Lane, handled the duties of First Lady during his term in office.) He shared a home with William Rufus King, an Alabama Senator and Vice President under Buchanan’s predecessor, Franklin Pierce. Their relationship was reportedly so close that Andrew Jackson and other contemporaries referred to them as ”Miss Nancy” and “Aunt Fancy”. Refer this link to know more on this:
http://newsfeed.time.com/2012/05/17/who-was-our-first-gay-president/