1: Preheat oven to 400°.
2: Peel and slice the potatoes as thin as possible.
3: Heat a saucepan to medium-high heat and melt the butter. Add the onions and cook until softened, then add garlic and cook for one minute.
4: Sprinkle in the flour and stir until combined. Slowly whisk in the milk, about a 1/2 cup at a time.
5: Once the milk is whisked in and evenly combined, pour in the chicken broth and whisk.
6: Cook until bubbling, then add salt, pepper, and thyme to taste.
7: In a 9x13 baking dish, layer sauce, potatoes, sauce, and cheese. Repeat the layering and top with remaining cheese.
8: Cook for roughly one hour, or until potatoes can be pierced easily with a fork.
9: Allow to cool, and enjoy.