token ttl is configurable
fix bug