Better use and checks of the token json