new variables + support to automatically refresh token