In a large stockpot, melt the butter over medium-high heat. Add the onions and sauté until browned and caramelized, around 30 minutes, stirring once in a while. Add garlic and sauté for 1 minute. Add flour and cook for another minute. Stir in the wine to deglaze the pan, using a wooden spoon to scrape up any browned bits on the bottom of the pan.
Add the stock, worcestershire sauce, bay leaf, and thyme. Bring to a simmer. Reduce heat to low and simmer for 10-15 minutes. Add salt and pepper to taste. Discard the bay leaf and sprigs of thyme.
Preheat oven to 350F/180C. While the soup is simmering, slice the baguette into 1-inch thick pieces and arrange them in single layer on baking sheet. Bake for 5-10 minutes, until the bread is toasted and lightly golden around the edges. Remove and set aside.
Switch oven to the broiler. Place oven-safe bowls on a baking sheet and ladle the soup into each of them, then top with 2 or 3 baguette slices and cheese.
Place on an oven rack close to the heat and broil for 2-4 minutes until the cheese is melted and bubbly. Remove and serve immediately.