fixed routing issues, added statechangesuccess on router