Add onions and garlic and season with sugar, thyme and pepper. Cook 15 minutes, stirring occasionally, until onions are golden in color and translucent.
Place the split bread on a baking sheet and broil until golden.
Spread half the onions and garlic on each half of bread in a thin layer.
Sprinkle each side of loaf with a handful of cheese and return to broiler for 30 seconds to bubble cheese.