In a large dutch oven, or other large stock pot, melt butter over medium heat.
Add the oil and onions. Cook onions until they are just starting to soften, about 15 minutes.
Add the salt, pepper and sugar; continue to cook, stirring occasionally, until the onions are a deep golden brown and caramelized, about 35-45 minutes longer. If you see the onions are browning too quickly, reduce the heat to low and stir often.
Add the wine and raise the heat to high. Cook until almost all of the liquid has evaporated, about 8-10 minutes.
Sprinkle flour over the onions and stir constantly until the onions look very dry, another 5-10 minutes. You're doing this to cook off the raw taste of the flour.
Add the thyme and bay leaves to the pot.
Add the broth and bring to a boil. Reduce the heat and allow the soup to simmer uncovered for 20-30 minutes. Remove from heat. Taste and adjust seasonings.
Heat the boiler to low. Cut two pieces of bread to fit each serving bowl. Place bread on a baking sheet and toast in the oven until crisp but not browned, about 1 minute per side.
Place ramekins or oven safe bowls on a baking sheet and ladle soup into them. Top each bowl with two pieces of toast and divide the shredded cheese equally between the bowls, covering the bread and some of the soup.
Carefully transfer the baking sheet to the oven and broil until the cheese is melted and bubbling 4-8 minutes.
Alternately, you can toast the bread with the cheese on top, by itself and transfer the warmed toast pieces to the top of your soup bowls and serve!