code: public boolean onLogout()
      {
          App application = this.getTask().getApplication();
          int iErrorCode = application.login(this.getTask(), null, null, this.getProperty(DBParams.DOMAIN));
          if (iErrorCode != DBConstants.NORMAL_RETURN)
              return false;
          String strMenu = this.getProperty(DBParams.HOME);
          if (strMenu == null)
              strMenu = this.getTask().getProperty(DBParams.MENU);
          if (strMenu != null)
          {
              BasePanel screenParent = this.getParentScreen();
  			int count = 0;
  			while (screenParent.popHistory(1, false) != null)
  			{
  				count++;
  			}
  			count--;	// Want to move back to the first one
  			if (count > 0)
  				popHistory(count, true);		// Dump all browser history
              Map<String,Object> properties = this.getProperties();
              this.finalizeThisScreen();  // Validate current control, update record, get ready to close screen.
              if (!(this instanceof MenuScreen))
              {
                  this.free();
                  new MenuScreen(null, null, screenParent, null, ScreenConstants.MAINT_MODE, properties);
              }
              else
                  this.doCommand("?" +  DBParams.MENU + '=' + strMenu, this, ScreenConstants.USE_SAME_WINDOW | DBConstants.PUSH_TO_BROWSER);
          }
          return true;   // Should always be successful        
      }
docs: Process the "Login" toolbar command.
  @return true if successful.