1.Slice onions thinly and set aside.
2.In a large pot, melt the butter over medium heat. Add the sliced onions and cook, stirring frequently, until the onions are caramelized and golden brown, about 30-40 minutes.
3.Add the white wine to deglaze the pot, scraping up any browned bits from the bottom.
4.Pour in the beef broth and add thyme and bay leaf. Simmer for another 15-20 minutes.
5.Preheat your oven to 200°C (400°F).
6.Slice the baguette and place on a baking sheet. Top each slice with grated gruyère cheese.
7.Toast in the oven until the cheese is bubbly and golden, about 5-7 minutes.
8.Serve the soup hot in bowls, topped with the cheesy baguette slices.