Synthetic and theoretical investigation on the one-pot halogenation of β-amino alcohols and nucleophilic ring opening of aziridinium ions.