Classic Patty Melt

Ingredients:

6 slices rye bread

6 tablespoons unsalted butter, softened

1 pound ground beef

½ teaspoon salt

¼ teaspoon black pepper

1 tablespoon olive oil (for cooking onions)