Can you point to the rule which says member nations are free to control immigration from within the community? Remain should have had it as a banner headline. As for non-EU migration, Britain has the final say on who gets work and residence. This unremarkable criterion is exercised by democracies such as the USA and Australia.
Try going and working in any other EU country you will soon find out.There are ways and means of restricting immigration and staying within the agreed EU rules, but the uk government wanted the immigrants.
As to non-EU immigration you make my point, people kick up a fuss about EU immigration but non EU immigration that could have been reduced wasnt, why because the government wanted the in flow from both the EU and externally and has also admitted that they want both to continue at something similar to the current rates.