updated delete thread controller to use the secure version