UK shadow home secretary resigns over terror law