Signalling mechanisms underlying priming and tolerance of T cells