The legislation will allows the government to essentially outlaw hardline extremist groups and curb hate speech.