Preheat oven to 350.
In a large sauce pan, saute onions in the butter until tender.
Stir in flour, salt, and pepper until blended.
Gradually add milk and bring to a boil, cook and stir for 2 minutes until thickened.
Place half of the potatoes in a greased 3 quart baking dish.
Pour half of the sauce over the potatoes.
Repeat the layers.
Bake uncovered for 60-70 minutes.