diff --git a/mongodb_session/mongodb_session.inc b/mongodb_session/mongodb_session.inc
index 5abefae..3e8fc14 100644
--- a/mongodb_session/mongodb_session.inc
+++ b/mongodb_session/mongodb_session.inc
@@ -110,7 +110,8 @@ function _drupal_session_read($sid) {
     // so next time we get it from Mongo.
     include_once dirname(__FILE__) . '/mongodb_session.module';
     $user->roles = array();
-    $user->roles = mongodb_session_user_insert(array(), $user);
+    $edit = array();
+    $user->roles = mongodb_session_user_insert($edit, $user, 'account');
   }
   // We found the client's session record and they are an authenticated,
   // active user.
diff --git a/mongodb_session/mongodb_session.install b/mongodb_session/mongodb_session.install
index 6199cf0..30ddbbf 100644
--- a/mongodb_session/mongodb_session.install
+++ b/mongodb_session/mongodb_session.install
@@ -54,3 +54,49 @@ function mongodb_session_update_7000() {
     mongodb_session_ensure_indexes();
   }
 }
+
+
+/**
+ * Update users to ensure their roles are saved to the user collection.
+ *
+ * Changes made to the session ensure that roles are saved to user accounts.
+ * However, user accounts may not have been stored with roles prior to this
+ * change and therefore those users will encounter access denied messages.
+ * This update will resave accounts with roles to ensure users have proper
+ * access.
+ */
+function mongodb_session_update_7101(&$sandbox) {
+  // Initialize the batch process.
+  if (!isset($sandbox['progress'])) {
+    $sandbox['progress'] = 0;
+    $sandbox['query']['_id']['$gt'] = 0;
+  }
+
+  // Get a user account to update.
+  $uids = mongodb_collection('fields_current', 'user')
+    ->find($sandbox['query'], array('_id' => 1))
+    ->sort(array('_id' => 1))
+    ->limit(1);
+
+  // Break point if we run out of users to work on.
+  $continue = $uids->hasNext();
+
+  // Perform the user update.
+  foreach ($uids as $uid) {
+    if (isset($uid['_id'])) {
+      $user = user_load($uid['_id']);
+      if ($user) {
+        user_save($user);
+      }
+      $sandbox['query']['_id']['$gt'] = $uid['_id'];
+    }
+    $sandbox['progress']++;
+  }
+
+  $sandbox['#finished'] = 0;
+  // If we hit the count or run out of users, then stop.
+  if (!$continue) {
+    $sandbox['#finished'] = 1;
+    return t('%num user accounts were updated.', array('%num' => $sandbox['progress']));
+  }
+}
\ No newline at end of file
diff --git a/mongodb_session/mongodb_session.module b/mongodb_session/mongodb_session.module
index d5aae8a..7bb63d2 100644
--- a/mongodb_session/mongodb_session.module
+++ b/mongodb_session/mongodb_session.module
@@ -14,6 +14,44 @@ function mongodb_session_simpletest_alter(&$groups) {
   unset($groups['Session']);
 }
 
+
+/**
+ * Implements hook_user_update().
+ */
+function mongodb_session_user_update(&$edit, $account, $category) {
+  // Update field values for changed values of the user.
+  $roles = _mongodb_session_get_roles($account);
+  // If mongodb_field_storage is enabled it will take care of creating
+  // initial user entry just add roles to it.
+  if (module_exists('mongodb_field_storage')) {
+    $save = array(
+      '$set' => array('roles' => $roles)
+    );
+  }
+  else {
+    $save = array(
+      '$set' => array_merge((array) $account, array(
+        '_bundle' => 'user',
+        'roles' => $roles,
+      )),
+    );
+    foreach (array('uid', 'created', 'access', 'login', 'status', 'picture') as $key) {
+      $save['$set'][$key] = (int) $save['$set'][$key];
+    }
+  }
+  mongodb_collection('fields_current', 'user')->update(array('_id' => (int) $account->uid), $save, array('upsert' => TRUE));
+  return $roles;
+}
+
+
+/**
+ * Implements hook_user_insert().
+ */
+function mongodb_session_user_insert(&$edit, $account, $category) {
+  return mongodb_session_user_update($edit, $account, $category);
+}
+
+
 /**
  * Implements hook_user_login().
  */
