Adding in automatic token refresh