Demo use of refresh token
Refactor code for clarity