Revert two hunks in previous patch, as this breaks the refresh and renew token.