       attributes:
         href    : "#"
       click     : (event)=>
-        return if @groupsEnabled()
+        if @groupsEnabled()
+          @closeGroupView()
+          return
 
         event.stopPropagation()
         event.preventDefault()

        height : groupLandingContentView.getHeight() - (256)


    groupLandingContentView = new KDView
      lazyDomId : 'group-landing-content'

    groupLandingGroupContentView = new KDView
      lazyDomId : 'group-content-wrapper'


    if isLoggedIn
      if @groupsEnabled()

    $('body').addClass "login"
    console.log "LOGGED IN WITH GROUPS"

    groupLink = new KDCustomHTMLView
      partial: "Login"
      cssClass: "bigLink"

    if state
      KD.getSingleton('router').handleRoute "/#{@getSingleton("router")?.getCurrentPath()+'/Activity'}", state:{}
      groupLink.click = =>
        @closeGroupView()

      groupLink.updatePartial 'Go to Group'

    else
      groupLink.click = =>
        @groupLandingView._windowDidResize = =>

        @getSingleton('mainController').loginScreen.show()
        @getSingleton('mainController').loginScreen.animateToForm 'login'
        $('.group-landing').css 'height', 0

    groupLink.appendToSelector '.group-login-buttons'

    $('.group-landing').css 'height', window.innerHeight - 50

  closeGroupView:->
    @mainTabView.showHandleContainer()
    @groupLandingView._windowDidResize = noop
    $('.group-landing').css 'height', 0

  decorateLoginState:(isLoggedIn = no)->

    @groupLandingView = new KDView
      lazyDomId : 'group-landing'

    groupLandingContentView = new KDView
      lazyDomId : 'group-landing-content'

    groupLandingGroupContentView = new KDView
      lazyDomId : 'group-content-wrapper'

    @groupLandingView.listenWindowResize()

