In a large saucepan, over medium heat, melt the butter and add in the onions, garlic and thyme sprigs. Season well and Cook for about 10 to 15 minutes or until all the onion are caramelized, stirring every 2-4 minutes.
Next add some cognac if desired and pour in the white wine and the beef stock into the onion mixture.
Stir once or twice. Bring to the boil then drop the heat to low, add a lid and simmer for about 25-30 minutes or until the onions are breaking and very soft. Check the seasoning.
Meanwhile, warm a sauté pan with the garlic butter and once the butter is melted add the pieces of bread. Slowly cook until browned on all sides. Remove from the heat and set aside.
When the soup is ready to serve, preheat the oven on grill or 220˚C.
Pour the soup in serving bowl or copper pan if you have. Add the toasted bread and sprinkle with grated cheese.
Grill or roast in the oven until the cheese is melted.
Remove from the oven, season well with black pepper and serve immediately.