add support for offline access

Basically, 2 additions were made:
1. expose an option to request for offline access
2. save an expiry date to the session so that we could regenerate the access token before it expires.