Layer 1/2 of the potatoes into bottom. Top with the onion slices, and add the remaining potatoes. Season with salt and pepper to taste.
Make bechamel
In a medium-size saucepan, melt butter over medium heat. whisk in flour and cook till a blond roux is formed. Stir in milk. Cook until sauce has thickened. Add additional milk if necessary to bring bechamel to the desired consistency. Remove from heat and stir in cheese till melted, one handful at a time. Taste and adjust seasonings.
Pour cheese over the potatoes, and cover the dish with aluminum foil
Bake 1 1/2 hours in the preheated oven. Remove cover during last 15 minutes of cooking to promote browning.