Preheat oven to 400 degrees F. Butter a 1 quart casserole dish.
Layer 1/2 of the potatoes into bottom of the prepared casserole dish. Top with the onion slices, and add the remaining potatoes. Season with salt and black pepper to taste.
In a medium-size saucepan, melt butter over medium heat. Mix in the flour, milk, salt, pepper, sugar. Cook until mixture has thickened. Stir in cheese all at once and add in vanilla extract and continue stirring until melted, about 30 to 60 seconds. Pour mix over the potatoes, and cover the dish with aluminum foil.
Bake 1 hour in the preheated oven. Remove from oven after it's done. Allow it to cool down for 5 minutes and serve.
Enjoy! Make sure you tag #DinnerWithTayo, I would love to see your dish.