made token update on every page change on client side