added support for refresh tokens and lifetime