Specifically interesting in this context is that the turn of the 20th century, and the 1920s in particular, is really the birth place of modern immigration policy.
Of note is the fact that the requirement of visas for entry and quotas on point of origin appeared around this time- if you read newspaper op-eds for the immigration act of 1924 (or the earlier chinese exclusion act), these measures are specifically pointed out as a way to maintain the racial makeup of the country.
Prior to that point, visitors could just turn up at Ellis island for entry. Afterwards, the island itself served more as an offshore detention center for what were then classified as radicals, anarchists, and those "likely to become a public charge"— awaiting deportation.
Citizenship, too, could once be had for as little as the price of a dozen eggs-- check out this booklet published 1921: https://archive.org/details/howtotakeoutyour00metrrich/page/...
"All it costs is $1, not a penny more. No witnesses, no examination, no pull required." -- 2 years of residence later, another set of papers (also on Archive.org) and a short literacy test (added in 1917) and you could be a citizen-- but this rapidly changed as additional quotas and restrictions were added.
The history of immigration law is a fascinating topic, and there's a lot of interesting primary sources available.