Despite some early struggles, he experienced moderate success as an attorney and was able to establish his financial independence from his parents. Rather than retiring from public service, Adams won election to the House of Representatives, where he would serve from 1831 to his death in 1848. He joined the Anti-Masonic Party in the early 1830s before becoming a member of the Whig Party, which united those opposed to President Jackson. On his way to the Netherlands, he met with John Jay, who was then negotiating the Jay Treaty with Great Britain. Adams supported the Jay Treaty, but it proved unpopular with many in the United States, contributing to a growing partisan split between the Federalist Party of Alexander Hamilton and the Democratic-Republican Party of Thomas Jefferson.Adams spent the winter of 1795–96 in London, where he met Louisa Catherine Johnson, the second daughter of American merchant Joshua Johnson. His election went against the generally held opinion, shared by his own wife and youngest son, that former presidents should not run for public office.