Dirac cohomology, unitary representations and a proof of a conjecture of Vogan