In a dutch oven (I used a 6 quart, the absolute smallest you should use), melt butter on medium-high heat. Add in the onions, salt, and sugar. Cover and stir occasionally. Once the onions are translucent and have released their liquid a bit, remove the lid and cook until the liquid has mostly evaporated. Reduce heat to medium and cook until the onions have caramelized. Pay extra attention to make sure they aren't burning and adjust the temperature accordingly. Stir occasionally to prevent browned bit from sticking to the bottom of the pan. This will take a bit, so be patient.
Once the onions are cooked down, add the white wine. Continue to cook until nearly evaporated. Add broth, thyme, bay leaf, and salt and pepper to taste. Bring to a boil and reduce to a simmer for about 30 minutes.
While the soup is reducing, tear up your baguette or rustic loaf and toss in olive oil and season with salt and pepper. Toast in an oven heated to 350° for about 15-20 minutes. Set aside.
Once the soup has cooked for about 30 minutes, remove the thyme and bay leaf. About 6 oven-safe bowls or large oven-safe ramekins, placed on a sheet pan, divide the soup evenly. Use one cup of the cheese to top the soup, place the toasted bread on the soup, and top with the remaining cup of cheese.
With your oven set to 450° toast the tops of the soup until browned and bubbly—about 10 minutes. Keep watch to make sure they don't burn. Once they are toasted, allow the soup to cool for about 5 minutes before serving.