For the answer to the question above, John Adams was the president when the Alien and Sedition Act was put into effect. The Act gave the different state's rights to deport or even imprison foreigners. The act also made it difficult for the immigrants to be given the right to vote.