Slice onions, leeks and shallots very thinly. Heat butter in soup pot just until melted. Add onions, leeks, shallots and pepper; saute until onions begin to caramelize or become a light golden brown. Sprinkle in flour and stir until traces of flour disappear. Gradually add beef stock or consomme, stirring, then beer and water and bay leaf. Boil at moderately high heat, stirring constantly for 1 minute. Reduce heat to low and cook uncovered, for 30 minutes. Discard bay leaf. Taste soup; add salt and pepper if desired. Turn soup into individual broiler-proof bowls. Toast baguette slices in toaster oven until crisp. Place baguette slices on top of soup in bowls. Sprinkle top of each bowl with a generous amount of cheese. Place bowls under broiler until cheese melts and turns brown and bubbles.