First, I don't believe the idea of human rights allows a state to tell people where they are allowed or forbidden to live.
Secondly, I don't believe immigration controls are ultimately feasible. In the US this is obvious in the big population of illegal immigrants, other countries are also discovering that they can't really stop people from entering and that hunting down and deporting hundreds of thousands of people is harder than it looks.
Thirdly, I don't believe a society can save money by withholding social welfare to someone who lives among them. The cost in health care, crime, and lost potential may very well outpace the savings.
I also believe a UBI would force countries to try and tighten their immigration controls. The problem is not so much that the immigrants wouldn't ultimately benefit that society, but the upfront payments and increased financial risks are just scary as hell.