Melt butter in a large Dutch oven or soup pot, over medium-low heat. Add onions and cook, stirring frequently, about 50 minutes or until caramelized. Add garlic and sauté for 1 minute. Remove from heat and add the brandy. Return back to the heat, and deglaze the pan, using a wooden spoon to scrape up any browned bits on the bottom of the pan. Sprinkle the flour, and cook for an additional 2 minutes.
Slowly add the broth, dry sherry, bay leaves, thyme, salt, and black pepper; stir to combine. Reduce heat to medium-low, cover and simmer for 40 minutes. Discard the bay leaves and sprigs of thyme.
Preheat oven to broil setting.
Place 1 toasted baguette slice in the bottom of ovenproof soup crocks and ladle the soup in and then top with an additional toasted baguette slice. Top each slice with about ¼ cup of cheese. Place soup crocks on a baking sheet and transfer to oven. Broil for 2-4 minutes, or until the cheese is melted and bubbly. Serve immediately. Enjoy!