Preheat oven to 350 degrees F.
Saute onion in butter until translucent. Whisk in flour to form a roux. Gradually whisk in milk until thickened. Add cheeses and season. Remove from heat and beat in yolks. Allow to cool.
While egg yolks are cooling, beat whites to stiff peak. Gently fold in whites to cheese mixture. Add to buttered 1 1/2-quart casserole dish and bake for 35 to 40 minutes.