R on the application of SO v Barking and Dagenham LBC and Secretary of State for the Home Department