 
     @watchRef.on "value", (snapshot) =>
       @watchMap = snapshot.val() or {}
+
+    @userRef.child("status").onDisconnect().set "offline"
 
   fetchUsers: ->
     @workspaceRef.once "value", (snapshot) =>

    @chatRef        = @workspaceRef.child "chat"
    @watchRef       = @workspaceRef.child "watch"
    @usersRef       = @workspaceRef.child "users"
    @sessionKeysRef = @firebaseRef.child  "session_keys"

  bindRemoteEvents: ->

        @emit "WorkspaceSyncedWithRemote"
        @emit "SomeoneJoinedToSession", KD.nick() if isOldSession

      if @amIHost() then cb()
      else
        @pingHost (status) =>
          cb()  if status is "online"

    @usersRef.on "child_added", (snapshot) =>
      @fetchUsers()

    @usersRef.on "child_changed", (snapshot) =>
      name = snapshot.name()
      if @amIHost() and snapshot.val()?.status is "offline"
        message = "#{name} has left the session"

        @broadcastMessage
