Toward control of spin states for molecular electronics