Counting down token expiration instead of sending duration.
Cleaning up code for token generation.