       buttons      :
         quit       :
           title    : 'LEAVE'
-          callback : =>
-            @modal.destroy()
-            KD.singletons.router.handleRoute '/IDE'
+          callback : => @modal.destroy()
 
     @showModal options
     @removeMachineNode()
-    @rtm = null
+    @quit()
 
 
   handleParticipantLeaveAction: ->

    @showModal options, =>
      @broadcastMessages.push origin: KD.nick(), type: 'ParticipantWantsToLeave'
      @modal.destroy()
      @rtm = null

      options = channelId: @socialChannel.getId()
      KD.singletons.socialapi.channel.leave options, (err) =>
        return KD.showError err  if err
        @setMachineUser [KD.whoami()], no, ->
          KD.singletons.router.handleRoute '/IDE'


  removeMachineNode: ->

          callback : => @modal.destroy()

    @showModal options
    @quit()


  quit: ->

    KD.utils.killRepeat @autoSaveInterval
