Adding validation of token payload and unit tests