In a large oven proof saute pan, melt the butter until nice and hot.
While the pan is heating, peel and slice the onions.
Add the onion slices to the hot butter (or olive oil).
Cook and stir until nice and caramelized (usually between 20-30 minutes).
Stir in the flour and cook through.
Add the broth and bring to a boil. This should thicken slightly.
Toast the bread and add to the top of the broth and onion mixture.
Sprinkle the cheese over the bread.
Pop in the broiler just long enough to melt the cheese and brown it slightly.
Sprinkle with some fresh thyme if you have it. Serve.