diff --git a/lib/connection.js b/lib/connection.js
index <HASH>..<HASH> 100644
--- a/lib/connection.js
+++ b/lib/connection.js
@@ -404,6 +404,21 @@ Connection.prototype._outboundHeartbeatTimerReset = function () {
   }
 };
 
+Connection.prototype._saslResponse = function () {
+  var response;
+  if (this.options.authMechanism == 'AMQPLAIN')
+    response = {
+      LOGIN: this.options.login,
+      PASSWORD: this.options.password
+    };
+  else if (this.options.authMechanism == 'PLAIN')
+    response = "\0" + this.options.login + "\0" + this.options.password;
+  else
+    response = this.options.response;
+
+  return response;
+}
+
 Connection.prototype._onMethod = function (channel, method, args) {
   debug && debug(channel + " > " + method.name + " " + JSON.stringify(args));
 
@@ -439,10 +454,7 @@ Connection.prototype._onMethod = function (channel, method, args) {
       this._sendMethod(0, methods.connectionStartOk, {
         clientProperties: this.options.clientProperties,
         mechanism: this.options.authMechanism,
-        response: {
-          LOGIN: this.options.login,
-          PASSWORD: this.options.password
-        },
+        response: this._saslResponse(),
         locale: 'en_US'
       });
       break;
Support PLAIN SASL authentication mechansim