Melt butter over medium heat. Add flour and mix well. Allow to bubble for 1-2 minutes. Remove from heat and stir in milk. Return to heat and cook until thickened. Add cheese and salt and pepper. Stir until cheese melts.
Set aside and start on casserole.
Saute onions in butter, add eggs and scramble until soft. Do not overcook. Add mushrooms, salt and pepper. Fold in prepared cheese sauce and crumbled bacon. Spoon into lightly greased 9x13 baking dish.
Cover with plastic wrap and chill until ready to bake.