docs: public void doHome(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
          if (!common.checkGet(request, response)) return;
  
          // If nobody's logged in, send the browser to "/".
          User user = common.getLoggedInUser(request);
          if (user == null) {
              response.sendRedirect("/");
              return;
          }
  
          FormProtection fp = FormProtection.start(response);
          response.setContentType("text/html");
          response.setCharacterEncoding("utf-8");
          PrintWriter out = new PrintWriter(new OutputStreamWriter(response.getOutputStream(), "UTF-8"));
  
          out.println("<html>");
          out.println("<head><title>Home - Web File Browser</title></head>");
          out.println("<body>");
          fp.insertAntiRedressHtml(out);
  
          // Show user info.
          out.println("<h2>User: " + escapeHtml4(user.username) + "</h2>");
  
          if (user.dropboxAccessToken != null) {
              // Show information about linked Dropbox account.  Display the "Unlink" form.
              out.println("<p>Linked to your Dropbox account (" + escapeHtml4(user.dropboxAccessToken) + "), ");
              out.println("<form action='/dropbox-unlink' method='POST'>");
              fp.insertAntiCsrfFormField(out);
              out.println("<input type='submit' value='Unlink Dropbox account' />");
              out.println("</form>");
              out.println("</p>");
              out.println("<p><a href='/browse'>Browse your Dropbox files</a></p>");
          } else {
              // They haven't linked their Dropbox account.  Display the "Link" form.
              out.println("<p><form action='/dropbox-auth-start' method='POST'>");
              fp.insertAntiCsrfFormField(out);
              out.println("<input type='submit' value='Link to your Dropbox account' />");
              out.println("</form></p>");
          }
  
          // Log out form.
          out.println("<p><form action='/logout' method='POST'>");
          fp.insertAntiCsrfFormField(out);
          out.println("<input type='submit' value='Logout' />");
          out.println("</form></p>");
  
          out.println("</body>");
          out.println("</html>");
          out.flush();
      }