Thinly slice the potatoes with a mandolin; also slice the onions and cheese as thinly as possible. Add the butter to a large frying pan and melt on low heat. When the butter is just melted, remove the pan from the heat and place alternating layers of potatoes, onions and cheese in the pan (reserving a little cheese for the topping), seasoning between each layer. Cover and cook gently for about half an hour until the potatoes and onions are cooked through. Add the remaining cheese on top, season and place under a pre-heated grill. Cook until the topping is golden brown and bubbling then serve straight from the pan. Serve with salad or steamed greens.