fix session routing and token errors