Put butter and oil in a big pot.
Add onions. Stir to coat them well.
Add sugar, salt, and pepper.
Cook on low heat for 40 minutes.
Stir once in a while until onions turn brown.
Add wine. Stir and scrape the pot bottom.
Pour in beef broth. Add thyme and bay leaf.
Let it boil, then turn the heat down.
Let it simmer without a lid for 30 minutes.
Take out the thyme and bay leaf.
Toast the baguette slices.
Put soup in oven-safe bowls.
Place toast on top of each bowl.
Add lots of grated cheese on top.
Broil until the cheese melts and bubbles.
Take out and serve while hot.