Error checking fixed

Added a check valid token method and added a decode token to decode a
single token at a time and print the result.