       }
       else
       {
-        Serial.println( "Unauthorized access." );
+        ESP_LOGI( TAG, "Unauthorized access." );
         return request->send( 401, "text/plain", "Not logged in." );
       }
     }


bool setupMDNS( const String hostname )
{
  Serial.printf( "Check if %s is already present...\n", hostname.c_str() );
  uint32_t serviceIp = MDNS.queryHost( hostname.c_str() );
  if ( serviceIp != 0 )
  {
    Serial.printf( "%s already on network.\n", hostname.c_str() );
    return false;
  }
  Serial.printf( "%s is available.\nSetting new hostname...\n", hostname.c_str() );

  MDNS.end();

  if ( MDNS.begin( hostname.c_str() ) )
  {
    // Add service to MDNS-SD
    MDNS.addService( "http", "tcp", 80 );

    Serial.printf( "mDNS responder started\nmDNS name: %s.local.\n", hostname.c_str() );
    saveStringNVS( "hostname", hostname );
    Serial.printf( "mDNS hostname set to %s.\n", hostname.c_str() );
    return true;
  }
  else
  {
    Serial.println( "Error setting up MDNS responder!" );
    return false;
  }
}

      if ( request->authenticate( www_username, readStringNVS( passwordKeyNVS, www_default_passw ).c_str() ) )
      {
        startTimer = millis();
        ESP_LOGI( TAG, "Starting upload. filename = %s\n", filename.c_str() );
        if ( !filename.startsWith( "/" ) )
        {
          filename = "/" + filename;
