handle invalid refresh token errors and http errors better.