token expiration buffer

configurable expiration time buffer to refresh similar to iOS.
Test to verify expired and not expired token.
Issue #235