A molecular switch that controls cell spreading and retraction