     WiFi.begin(ssidchars, keychars);
   }
 
-  server.send(200, "text/html", toSend);
-  delay(100);
-}
-
-void handle_L0() { handle_root(); } 
-void handle_L2() { handle_root(); }
-void handle_ALL() { handle_root(); }
+  toSend += pageFooter;
+  server.send(200, "text/html", toSend);
+  delay(100);
+}


void handle_wifistatus() {
  Serial.println("serving page at /wifistatus");
  String toSend = wstatus;
  toSend += "<li>SSID: ";
  toSend += WiFi.SSID();
  toSend += "</li>";

  }

  if(ssid == "") {
    toSend += "<h2>Ooops, no SSID...?</h2>";
    toSend += "<p>Looks like a bug :-(</p>";
  } else {
    toSend += "<h2>Done! Joining...</h2>";
    toSend += "<p>Check <a href='/wifistatus'>wifi status here</a>.</p>";
    char ssidchars[sizeof(ssid)];
    char keychars[sizeof(key)];
    ssid.toCharArray(ssidchars, sizeof(ssid));
