Preheat oven to 375. In saucepan cook onions. Stir in flour, salt, and pepper until blended. Gradually stir in milk and cook. Stir constantly until thickens. Layer half potatoes in casserole dish. Pour half of sauce over top. Layer potatoes again, and top with remaining suace. Bake covered 45 minutes. Uncover, bake 15 minutes more.