The relationship went bad because of England wanting to repay its war debts by increasing taxes on the American colonists.
I’m not sure about this question
In 1802, in response to Jefferson's request for authority to deal with the pirates, Congress passed "An act for the protection of commerce and seamen of the United States against the Tripolitan cruisers," authorizing the President to "employ such of the armed vessels of the United States as may be judged requisite.