The States are sovereign nations. They always have been. The Union is a treaty-based federation of allied nations. Of course States can make any laws they wish, regarding immigration.