Add a StateService that allows controlled transitions from one state to another.