Dynamical evidence for a morphology-dependent relation between the stellar and halo masses of galaxies