     atom.workspaceView.command 'spark-ide:update-core-status', =>
       @listVariables()
       @listFunctions()
+      @clearWatchers()
 
     atom.workspaceView.command 'spark-ide:logout', =>
+      @clearWatchers()
       if @hasParent()
         @detach()
-
-    @watchers = {}
 
   serialize: ->
 

        @refreshVariable variableName
      , 5000

  listFunctions: ->
    functions = SettingsHelper.get 'functions'


    ApiClient = require '../vendor/ApiClient'

    @client = null
    @watchers = {}

    @listVariables()
    @listFunctions()
