Heat a heavy bottom Dutch oven or stockpot on medium heat.
Add in butter and heat until melted. Add in thinly sliced onions and heat on medium low for 30-40 minutes, stirring the onions occasionally.
After about 15 minutes of cooking, add in the brown sugar. Once onions are soft and have begun to caramelize, drizzle beer and heat on medium low heat until most of the liquid has evaporated.
Sprinkle flour, Worcestershire sauce and bay leaves over mixture and cook for 1-2 minutes.
Fill stock or dutch oven with 2 quarts of beer or vegetable stock. Add in thyme sprigs and simmer on low for 30-40 minutes.
Taste test soup for salt and pepper.
Preheat oven to 400 F. Remove thyme sprigs and bay leaves.
Transfer a few ladle fulls of soup to smaller copper cocottes. Top with a slice of baguette and shredded cheese.
Broil or bake for 5-10 minutes or until tops are golden brown and cheese is bubbly.