 
           strcpy(mqtt_server, json["mqtt_server"]);
           strcpy(mqtt_port_config, json["mqtt_port"]);
+          strcpy(mqtt_user, json["mqtt_user"]);
+          strcpy(mqtt_password, json["mqtt_password"]);
 
         } else {
           Serial.println("failed to load json config");

  //end read
}


WiFiManagerParameter custom_mqtt_server("server", "mqtt server", mqtt_server, 120);
WiFiManagerParameter custom_mqtt_port("port", "mqtt port", mqtt_port_config, 5);

void initWifiManager() {


  // The extra parameters to be configured (can be either global or just in the setup)
  // After connecting, parameter.getValue() will get you the configured value
  // id/name placeholder/prompt default length
  // WiFiManagerParameter custom_mqtt_server("server", "mqtt server", mqtt_server, 120);
  // WiFiManagerParameter custom_mqtt_port("port", "mqtt port", mqtt_port_config, 5);
  // WiFiManagerParameter custom_blynk_token("blynk", "blynk token", blynk_token, 32);

  //WiFiManager
  //Local intialization. Once its business is done, there is no need to keep it around

    JsonObject& json = jsonBuffer.createObject();
    json["mqtt_server"] = mqtt_server;
    json["mqtt_port"] = mqtt_port;
    json["mqtt_user"] = mqtt_user;
    json["mqtt_password"] = mqtt_password;

    File configFile = SPIFFS.open("/config.json", "w");
    if (!configFile) {
