Theresa May vows to “take on extremists”, as Jeremy Corbyn promises thousands more police and security staff.