Handles expiring tokens and no internet connectivity