Melt butter in saucepan. Add flour to make a roux. Add salt and pepper to taste (I do not add salt). After the roux is slightly browned, stir in milk slowly and in small batches. Heat milk through until slightly thickened. Add cheese to melt.
Spray casserole dish VERY WELL. Add a layer of potatoes, a layer of onions, pepper (salt as desired) and a layer of cheese sauce. Repeat, ending with cheese.