The mayor of London is critical of the government's intention to end freedom of movement as soon as Brexit has happened.