Checking the token expiry time

Checking if our token has expired.

I am not sure if this is the best place to put such logic, in case you have a better suggestion please let me know.