   // Setup a reset page to cause WiFiManager information to be reset.
   server.on("/reset", handleReset);
 
-#if FIRMWARE_OTA_ENABLE
+#if FIRMWARE_OTA
   // Setup the URL to allow Over-The-Air (OTA) firmware updates.
-  server.on("/update", HTTP_POST, [](){
-      server.sendHeader("Connection", "close");
-      server.send(200, "text/plain", (Update.hasError())?"FAIL":"OK");
-      ESP.restart();
-    }, [](){
-#if (HTML_PASSWORD_ENABLE || FIRMWARE_OTA_PASSWORD_ENABLE)
-      if (!server.authenticate(kHtmlUsername, kHtmlPassword)) {
-        debug("Basic HTTP authentication failure for /update.");
-        return server.requestAuthentication();
-      }
-#endif  // (HTML_PASSWORD_ENABLE || FIRMWARE_OTA_PASSWORD_ENABLE)
-      HTTPUpload& upload = server.upload();
-      if (upload.status == UPLOAD_FILE_START) {
-        WiFiUDP::stopAll();
-        debug("Update: " + upload.filename);
-        uint32_t maxSketchSpace = (ESP.getFreeSketchSpace() - 0x1000) &
-            0xFFFFF000;
-        if (!Update.begin(maxSketchSpace)) {  // start with max available size
-#ifdef DEBUG
-          Update.printError(Serial);
+  if (strcmp(kHtmlPassword, kDefaultPassword)) {  // Allow if password changed.
+    server.on("/update", HTTP_POST, [](){
+        server.sendHeader("Connection", "close");
+        server.send(200, "text/plain", (Update.hasError())?"FAIL":"OK");
+        ESP.restart();
+      }, [](){
+        if (!server.authenticate(kHtmlUsername, kHtmlPassword)) {
+          debug("Basic HTTP authentication failure for /update.");
+          return server.requestAuthentication();
+        }
+        HTTPUpload& upload = server.upload();
+        if (upload.status == UPLOAD_FILE_START) {
+          WiFiUDP::stopAll();
+          debug("Update: " + upload.filename);
+          uint32_t maxSketchSpace = (ESP.getFreeSketchSpace() - 0x1000) &
+              0xFFFFF000;
+          if (!Update.begin(maxSketchSpace)) {  // start with max available size
+#if DEBUG
+            Update.printError(Serial);
 #endif  // DEBUG
+          }
+        } else if (upload.status == UPLOAD_FILE_WRITE) {
+          if (Update.write(upload.buf, upload.currentSize) !=
+              upload.currentSize) {
+#if DEBUG
+            Update.printError(Serial);
+#endif  // DEBUG
+          }
+        } else if (upload.status == UPLOAD_FILE_END) {
+          // true to set the size to the current progress
+          if (Update.end(true)) {
+            debug("Update Success: " + (String) upload.totalSize +
+                  "\nRebooting...");
+          }
         }
-      } else if (upload.status == UPLOAD_FILE_WRITE) {
-        if (Update.write(upload.buf, upload.currentSize) !=
-            upload.currentSize) {
-#ifdef DEBUG
-          Update.printError(Serial);
-#endif  // DEBUG
-        }
-      } else if (upload.status == UPLOAD_FILE_END) {
-        if (Update.end(true)) {  // true to set the size to the current progress
-          debug("Update Success: " + (String) upload.totalSize +
-                "\nRebooting...");
-        }
-      }
-      yield();
-    });
-#endif  // FIRMWARE_OTA_ENABLE
+        yield();
+      });
+    }
+#endif  // FIRMWARE_OTA
 
   // Set up an error page.
   server.onNotFound(handleNotFound);

  irrecv.enableIRIn();  // Start the receiver
#endif  // IR_RX

  #ifdef DEBUG
  // Use SERIAL_TX_ONLY so that the RX pin can be freed up for GPIO/IR use.
  Serial.begin(BAUD_RATE, SERIAL_8N1, SERIAL_TX_ONLY);
  while (!Serial)  // Wait for the serial connection to be establised.
    delay(50);
  Serial.println();
  debug("IRMQTTServer " _MY_VERSION_" has booted.");
  #endif  // DEBUG

  setup_wifi();


    return server.requestAuthentication();
  }
#endif
  String html =
    "<html><head><title>IR MQTT server</title></head>"
    "<body>"
    "<center><h1>ESP8266 IR MQTT Server</h1></center>"
