         return @pingHostTimer = KD.utils.wait 10000, =>
           @showNotActiveView()
 
-      @syncWorkspace()
-      @connected = yes
-      KD.utils.killWait @pingHostTimer
+      @groupNameRef.once "value", (snapshot) =>
+        groupName = snapshot.val()
+
+        KD.whoami().checkGroupMembership groupName, (err, isMember) =>
+          unless isMember
+            warn "you are not belong to this group"
+            return @showNotActiveView()
+
+          @syncWorkspace()
+          @connected = yes
+          KD.utils.killWait @pingHostTimer
 
     @usersRef.on "value", (snapshot) =>
       data   = @reviveSnapshot snapshot

    @historyRef     = @workspaceRef.child "history"
    @chatRef        = @workspaceRef.child "chat"
    @usersRef       = @workspaceRef.child "users"
    @userRef        = @usersRef.child KD.nick()
    @requestPingRef = @workspaceRef.child "requestPing"
    @onlineCountRef = @workspaceRef.child "onlineUserCount"

        @createPanel()
      else
        @createPanel()
        @keysRef.set @sessionData
        @groupNameRef.set KD.getSingleton("groupsController").currentGroupName

      if not isOldSession
        @addToHistory { message: "$0 started the session", by: KD.nick() }
