code: private void loginForm(HttpServletResponse response) {
          response.reset();
          response.addHeader("WWW-Authenticate",
                             "Basic realm=\"!!Fedora Repository Server\"");
          response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
      }
docs: Sends a 401 error to the browser. This forces a login screen to be
  displayed allowing the user to login.
  
  @param response
  the response to set the headers and status