                     UIApplication.shared.openURL(authRedirectURL)
                 }
             } else {
-                self.lastToken = request.token
                 self.removePendingRequest(uuid: requestUUID)
                 completionBlock(response)
             }

        // On success, store last token, remove pending request, and call completion block.
        // Else, if auth is still required, open Safari and request authentication.
        request.perform(cloudService: cloudService, queue: queue) { (_, response) in
            if let authRedirectURL = response.authRedirectURL {
                if #available(iOS 10, *) {
                    UIApplication.shared.open(authRedirectURL)

        // On success, store last token and call completion block.
        // Else, if auth is required, add request to pending requests, open Safari and request authentication.
        request.perform(cloudService: cloudService, queue: queue) { (requestUUID, response) in
            if let token = request.token {
                self.lastToken = token
            }

            if let authRedirectURL = response.authRedirectURL {
                if #available(iOS 10, *) {
                    UIApplication.shared.open(authRedirectURL) { success in
