Migrants can now appeal detention to a judge