 
     func logoutThenDeleteAllStoredData() {
         cancelAllRunningTasks { () -> Void in
-
             self.logout(success: { () -> Void in
                 // get run for every time a sucessful scope logs out
                 }) { (error) -> () in

            failure(error: APIError.HasNoOAuthTokenForScopeError(attachmentScope!))
            return
        }

        let mimeType = APIClient.mimeType(fileType: baseEncryptionModel.fileType)
        let baseEncryptedModelUri = baseEncryptionModel.uri


        fullToken?.refreshToken = nil

        APIClient.sharedClient.logoutThenDeleteAllStoredData()
        let alertController = UIAlertController.forcedLogoutAlertController()
        let userInfo  : [NSObject : AnyObject] = [ "alert" as NSObject : alertController as AnyObject]
        NSNotificationCenter.defaultCenter().postNotificationName(kShowLoginViewControllerNotificationName, object: nil, userInfo: userInfo)
    }

    func responseCodeForOAuthRefreshTokenRenewaIsUnauthorized(response: NSURLResponse) -> Bool {
