This is the recipe my husband uses when he makes Potatoes Au Gratin. You will need to refer to Recipe #207024 for this to make the cheese sauce. Using a food processor or mandoline to slice the veggies is key.
Generously butter the inside of a 9X13 baking dish and set aside.
Peel the potatoes and thinly slice along with the onions and mushrooms, using a food processor or mandoline.
Layer half the potatoes into the bottom of the baking dish, then half of the onions, followed by half the mushrooms. Season with salt and pepper. Repeat layers with remaining veggies and season with salt and pepper.
Pour cheese sauce over potatoes and cover with aluminum foil.
Bake for 1 1/4 hours. Remove from oven and take foil off. Put a single layer of sliced tomatoes on top, if using. Sprinkle with remaining 50g cheese and return to oven for 15 minutes, turning on broiler/grill for the last 3-5 minutes to brown cheese.