In a large Dutch oven or large pot, melt butter over medium heat. Add the onions; cook onions are until softened, stirring occasionally, about 5 minutes. Add the salt, pepper, and continue to cook, stirring occasionally, until onions are only lightly browned. Do not caramelize.
Add wine and raise heat to high. Cook until the liquid has reduced by ¾.
Add stock, thyme and bay leaf to onions. Bring to a boil, reduce to a simmer, and cook, uncovered, about 20 minutes. Add sherry. Remove from heat and remove bay and thyme sprigs. Adjust seasoning.
Heat the broiler. Cut two 1/2-inch baguette slices for every serving of soup. Place baguette slices on a rimmed baking sheet and toast in oven until crisp and dry but not browned, about 1 minute per side. Rub one side of each toast with the garlic clove and set aside.
Place crocks on a rimmed baking sheet, and ladle in soup. Top each serving of soup with two garlic-rubbed toasts. Divide cheese among the servings, covering the bread and some of the soup. Carefully transfer baking sheet to oven and broil until cheese is melted and bubbling, 3-4 minutes…do not burn. Carefully remove crocks from oven, place on chargers and serve.