This first step is the most important: carmelize the onions. Begin by melting the butter in a large stockpot set over medium-high heat. Then add the onions and give a good stir so that they are fully coated in the butter. Stir the onions every 3-5 minutes for the first 20 minutes, making sure to scrape the bottom. Then for the next 10 minutes, give a good stir about every minute or so to keep them from burning. If you're worried that the onions are looking a little dry, it's okay to add a little more butter or a splash of the white wine to help things unstick. When the onions are caramelized, add in the garlic and saute for a minute or two before stirring in the flour and cooking for one minute more. Then stir in the wine to deglaze the pan and use a wooden spoon to scrape up all that goodness at the bottom of the pan.
After deglazing the pan, add the stock, sauce, bay leaf, and thyme and stir until combined. Allow the soup to cook until it reaches a simmer. Then reduce the heat to medium-low, cover, and allow to simmer for another 10 minutes. Remove the sprigs and leaf and discard.
While the soup is simmering, slice the baguette into 1-inch slices and heat your oven to 400°F. Arrange the baguette slices on a parchment-lined baking sheet and bake for 6-8 minutes or until golden brown. If you have oven-safe bowls/mugs, then place a serving of soup in each mug and top with a baguette and a sprinkling of cheese and broil for 2-4 minutes or until the cheese is nice and bubbly. If you don't have oven-safe dishes, then you can broil the cheese on top of the baguettes separately and then place on top of your soup. Serve and enjoy!