   ssid = getParam(req,"ssid");
   if (ssid != "") {
       password = getParam(req,"password");
-      stream_id = getParam(req,"stream-id");
-      stream_pk = getParam(req,"stream-pk");
+      stream_id = getParam(req,"stream_id");
+      stream_pk = getParam(req,"stream_pk");
       String doConnect = getParam(req,"connect");
       
       if (doConnect =="Yes" && ssid != "")  {
-      wifi_connected = connectWifi();
+      putConfiguration();
+      wifi_connected = connectWiFi();
       if (wifi_connected) {
           response = String("<h1>Connecting to access point Bye Bye</h1>");
   

  Serial.println("HTTP server started");
  
}
boolean connectWifi() {
// Connect to WiFi network
  Serial.println();
  Serial.println();

/*
 * on bootup attempt to read configuration from SPIFFS and connect
 * 
 * When config button is pressed start accesspoint and interact with user to provide the 
 * required access point  credentials and other parameters
 * save configuration to SPIFFS
 * Connect to the required access point and stop the server
 * 
 * In normal mode, collect data and send to the data store
 * 
 */
 
#include <ESP8266WiFi.h>
#include <WiFiClient.h> 
#include <FS.h>

//temporary access point credentials

