diff --git a/pyicloud/base.py b/pyicloud/base.py
index <HASH>..<HASH> 100644
--- a/pyicloud/base.py
+++ b/pyicloud/base.py
@@ -1,9 +1,11 @@
 import uuid
 import hashlib
 import json
+import logging
+import pickle
 import requests
 import sys
-import pickle
+import tempfile
 import os
 from re import match
 
@@ -16,6 +18,9 @@ from pyicloud.services import (
 )
 
 
+logger = logging.getLogger(__name__)
+
+
 class PyiCloudService(object):
     """
     A base authentication class for the iCloud service. Handles the
@@ -40,7 +45,10 @@ class PyiCloudService(object):
         self._base_system_url = '%s/system/version.json' % self._home_endpoint
         self._base_webauth_url = '%s/refreshWebAuth' % self._push_endpoint
 
-        self._cookie_directory = 'cookies'
+        self._cookie_directory = os.path.join(
+            tempfile.gettempdir(),
+            'pyicloud',
+        )
 
         self.session = requests.Session()
         self.session.verify = False
Cleaning up cookie handling to use a system-level temporary directory.  Adding logger.