Both countries were trying to colonize the Americas and they fought over land
They passed the Espionage and Sedition Acts which allowed the government to arrest and fine anyone speaking out against the war.
Article I of the US Constitution puts this power in the hands of each State's legislature.
If you are interested in this topic, there is a fascinating development in this occurring in the Second Congressional District of Maine, which has adopted Ranked Choice Voting to determine its representatives. The loser of this year's election just sued in Federal Court to invalidate this as a way to hold an election.