Conductance switching, hysteresis, and magnetoresistance in organic semiconductors