New laws will target extremist preachers and impose stiffer punishments, including refusing or cancelling visas.