       }
       snprintf( nvsKeyname, sizeof( nvsKeyname ), "channelname%i", channelNumber );
       preferences.putString( nvsKeyname, channel[channelNumber].name );
-      response = request->beginResponseStream( textHtmlHeader );
+      response = request->beginResponseStream( HTML_HEADER );
       response->printf( "channel %i name set to '%s'", channelNumber + 1, channel[ channelNumber ].name );
       return request->send( response );
     }
 
     else
     {
-      return request->send( 400, textHtmlHeader, "Invalid option" );
+      return request->send( 400, HTML_HEADER, "Invalid option" );
     }
   });
 
   server.on( "/api/setdevice", HTTP_POST, []( AsyncWebServerRequest * request )
   {
     AsyncResponseStream *response;
-    if ( !request->authenticate( www_username, preferences.getString( passwordKeyNVS, www_default_passw ).c_str() ) )
+    if ( !request->authenticate( WWW_USERNAME, preferences.getString( PASSWD_KEY_NVS, WWW_DEFAULT_PASSWD ).c_str() ) )
     {
       return request->requestAuthentication();
     }

      }
      else
      {
        return request->send( 400, textHtmlHeader, "Invalid orientation" );
      }
      OLED.end();
      OLED.init();
      OLED.setContrast( oledContrast << 0x04 );
      oledOrientation == OLED_ORIENTATION_NORMAL ? OLED.normalDisplay() : OLED.flipScreenVertically();
      preferences.putString( "oledorientation", ( oledOrientation == OLED_ORIENTATION_NORMAL ? "normal" : "upsidedown" ) );
      return request->send( 200, textHtmlHeader, preferences.getString( "oledorientation" ) );
    }

    else if ( request->hasArg( "password" ) )

    {
      if ( !numberOfFoundSensors )
      {
        return request->send( 501, HTML_HEADER, NOT_PRESENT_ERROR_501 );
      }
      if ( !request->hasArg( "number" ) )
      {
        return request->send( 400, HTML_HEADER, "No sensornumber" );
      }
      uint8_t sensorNumber = request->arg( "number" ).toInt();
      if ( sensorNumber >= numberOfFoundSensors )
      {
        return request->send( 400, HTML_HEADER, "Invalid sensornumber" );
      }
      response = request->beginResponseStream( HTML_HEADER );
      response->printf( "%s\n%.3f\n%x\n",
                        sensor[sensorNumber].name,
                        sensor[sensorNumber].tempCelcius,
                        sensor[sensorNumber].addr );
      return request->send( response );
    }

