A bill which has caused uproar becomes law as protesters face water cannon outside parliament.