class LoginHandler implements HttpHandler {

  private Map<String, Integer> sessions;
  private Map<String, Instant> sessionCreationTimes;

  public LoginHandler(Map<String, Integer> sessions, Map<String, Instant> sessionCreationTimes) {
    this.sessions = sessions;
    this.sessionCreationTimes = sessionCreationTimes;
  }

  @Override
  public void handle(HttpExchange exchange) {<FILL_FUNCTION_BODY>}
}

    // Generate session ID
    String sessionId = UUID.randomUUID().toString();

    // Store session data (simulated)
    int newUser = sessions.size() + 1;
    sessions.put(sessionId, newUser);
    sessionCreationTimes.put(sessionId, Instant.now());
    LOGGER.info("User " + newUser + " created at time " + sessionCreationTimes.get(sessionId));

    // Set session ID as cookie
    exchange.getResponseHeaders().add("Set-Cookie", "sessionID=" + sessionId);

    // Send response
    String response = "Login successful!\n" + "Session ID: " + sessionId;
    try {
      exchange.sendResponseHeaders(200, response.length());
    } catch (IOException e) {
      LOGGER.error("An error occurred: ", e);
    }
    try (OutputStream os = exchange.getResponseBody()) {
      os.write(response.getBytes());
    } catch (IOException e) {
      LOGGER.error("An error occurred: ", e);
    }
  
<no_super_class>