diff --git a/nodejs.module b/nodejs.module
index 24cf521..161fceb 100644
--- a/nodejs.module
+++ b/nodejs.module
@@ -500,7 +500,7 @@ function nodejs_auth_check($message) {
  * Default Node.js auth check callback implementation.
  */
 function nodejs_auth_check_callback($auth_token) {
-  return db_query("SELECT uid FROM {sessions} WHERE MD5(sid) = :auth_key", array(':auth_key' => $auth_token))->fetchField();
+  return db_query("SELECT uid FROM {sessions} WHERE MD5(sid) = :auth_key OR MD5(ssid) = :auth_key", array(':auth_key' => $auth_token))->fetchField();
 }
 
 /**
