     @client.on 'message', @message
 
   close: =>
-    @robot.logger.info 'Connection closed, attempting to reconnect'
+    @robot.logger.info 'Hubot UppTalk closed, attempting to reconnect'
     @reconnect()
 
   error: (error) =>
     @robot.logger.error error
 
   open: =>
-    @robot.logger.info 'Hubot UppTalk client open'
+    @robot.logger.info 'Hubot UppTalk open'
 
     @client.exec 'authenticate',
       username: @options.username
       password: @options.password
       @authenticated
 
-  authenticated: =>
-    @robot.logger.info 'Hubot UppTalk client authenticated'
+  authenticated: (err) =>
+    if err
+      @robot.logger.info 'Hubot UppTalk authentication failed'
+      process.exit()
+
+    @robot.logger.info 'Hubot UppTalk authenticated'
 
     @client.exec 'presence'
-    @robot.logger.info 'Hubot XMPP sent initial presence'
+    @robot.logger.info 'Hubot UppTalk sent presence'
 
     # @emit if @connected then 'reconnected' else 'connected'
     @emit 'connected'

    @makeClient()

  reconnect: () ->
    console.log 'reconnect'

  makeClient: () ->
    options = @options


  constructor: ( robot ) ->
    @robot = robot
    @reconnectTryCount = 0

  run: ->
    options =
