Partial implementation of auth retry. Maybe should be in pkgcloud