Adding new code to validate token expiricy based on the persistent falg, the xpiration and if the persistent token is enabled or not