added token expiration logic