Melt the butter in a large saucepan and add the onions. Slowly brown the onions. It is important to brown the onions VERY slowly. It takes about an hour to do. Just check them every once in a while. They should end up very soft, golden brown and transparent. Add the garlic after the onions have been cooking for about 45 minutes.
After the onions are cooked, turn up the heat to medium, stir in the flour and cook for 1 minute or until the flour is golden brown.
Add the stock, and stir until it boils. Season with salt and pepper and simmer the soup for 20 to 30 minutes.
Preheat the oven to 400ºF.
Mix the grated cheese with the mustard and pepper. Spread this on the bread slices and put one slice of bread on the bottom of each onion soup bowl, or put all of the bread in a large soup tureen. Pour the soup in. The bread will rise to the top.
Bake the soup in the oven, uncovered until the bread and cheese mixture is well browned and bubbling.