Police anti-terror squad spies on protest groups