Spin response of magnetic dipole transitions in 156Gd and 164Dy