Saute onions and garlic in oil over low heat until tender and golden yellow. Sprinkle flour over onions, cook a few minutes more, browning the flour well. Add stock and wine and bring to a boil, add thyme and bay leaf. Reduce heat, cover, and simmer gently for 20 minutes or so. Add salt and pepper, to taste.
Meanwhile, slice French bread into 3/4-inch slices and butter both sides. Toast slices on griddle until golden brown. Ladle soup into an ovenproof bowl, add toasted bread and cover with cheese. Place ovenproof bowl on a baking sheet lined with tin foil. Bake at 350 degrees F or 5 minutes under a hot broiler.