@RequestMapping(value = "/dataBrowserRegions", method = RequestMethod.GET)
  public void dataBrowserRegions(@SuppressWarnings("unused") HttpServletRequest request,
      HttpServletResponse response)
      throws IOException {
    // get cluster object
    Cluster cluster = repository.getCluster();

    // json object to be sent as response
    ObjectNode responseJSON = mapper.createObjectNode();

    try {
      // getting cluster's Regions
      responseJSON.put("clusterName", cluster.getServerName());
      ArrayNode regionsData = getRegionsJson(cluster);
      responseJSON.set("clusterRegions", regionsData);
      responseJSON.put("connectedFlag", cluster.isConnectedFlag());
      responseJSON.put("connectedErrorMsg", cluster.getConnectionErrorMsg());
    } catch (Exception e) {
      logger.debug("Exception Occurred", e);
    }

    // Send json response
    response.getOutputStream().write(responseJSON.toString().getBytes());
  }
Method isUserLoggedIn Check whether user is logged in or not.
geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/controllers/PulseController.java