Hong Kong security law 'needed to tackle terrorism'