Peel and cut the onions in half lengthwise, then into thin slices, lengthwise (No thinner than 1/8 inch thick).
Put the butter in a dutch oven or pot and start to melt it over medium heat.
Put the onions in the pan, stir them up with the butter, and sprinkle the baking soda over the top. (This is to help with the caramelization process. Don't use more than this).
Let the onions cook for 40-50 minutes, stirring occasionally, about every 10 minutes. Cut any large pieces smaller and cook until tender. (If the onions look like they might burn, turn the heat down and add a couple tablespoons of water, then continue). The onions should be reduced, soft, and golden brown. You may need to stir more frequently towards the end of the caramelization process so that they bottom doesn’t burn.
Cut the French bread or baguette into 1½-inch slices, prepare the cheese, and mince the garlic. Set aside.
Mix the flour with the sugar, ,
Once the onions are browned and all are very soft, stir in the minced garlic and sauté with the onions for about a minute, stirring constantly.
Stir the flour, thyme, sage, rosemary, marjoram, salt, and pepper mixture into the onions.
Pour a cup of beef broth over the onions, scraping up the browned bits stuck on the bottom of the pan.
Add the rest of the beef broth, sugar, red wine vinegar, and the bay leaf.
Bring soup to a boil. Once boiling, turn down heat and simmer on low, uncovered, for another 15 minutes.
Meanwhile, put the bread or baguette slices under the broiler, in the top 1/3rd of the oven, for about a minute on each side, until well-toasted on each side.
When the soup is done simmering, remove the bay leaf, and adjust the seasonings to taste.
Ladle the soup into each bowl or ramekin until each bowl is 3/4ths full.
Place a piece of toasted French bread or baguette on top of the soup.
Sprinkle the bread generously with shredded cheese or 1-2 slices of cheese per bowl, and place the bowls under the broiler. Broil until the cheese is golden brown, one or two minutes, watching carefully so it doesn't burn.
Serve immediately.