Make the burgers: In a medium bowl, combine the beef, egg, grated onion, garlic powder, salt and pepper. Mix until combined. Form into 6 thin patties.
Spread the butter onto one side of each slice of bread. Heat a large heavy-duty skillet or griddle over medium-high heat. Cook the burgers about 3 minutes on each side. Drain on paper towels. Drain the grease from the skillet.
In the same skillet, place 6 slices of bread, butter side down. Top each with a slice of cheese (if using), some sliced onions, and a burger. Top with the remaining cheese (if using) and bread, butter side up. Cook the sandwiches until golden brown, about 2 minutes per side.
Serve with mustard, ketchup, tomatoes, pickles or any other desired hamburger toppings.