Judges back terror stop and searches