1. fixed issue #1 IsExpired of the token is the opposite value
2. clean up code