Thinly slice the onions.
Melt butter in a pot and slowly sauté the onions until they turn brown.
Season the onions with salt and pepper.
Add flour and mix well.
Pour in the broth and simmer for 20 minutes.
Slice the bread thinly and toast it in the oven.
Pour the soup into a bowl, place the toasted bread on top, then add cheese.
Bake in the oven until the cheese is melted.