Judge says migrants sent to El Salvador prison must get a chance to challenge their removals