In a medium bowl combine the beer, water, molasses, yeast, vegetable shortening and onion; stir this mixture and allow it to rest for 25 minutes or until the yeast becomes active and frothy.
Add the wheat gluten, caraway, salt, cocoa, bread flour and rye flour and, using a wooden spoon, stir until it forms a solid mass. Turn the dough out onto a work surface and knead it for 10 minutes, it should become smooth and firm. Place the dough in a clean bowl that is large enough to allow it to rise and set the bowl in a warm draft free area for 1-2 hours, or until the dough has doubled in bulk.
Preheat an oven to 375F. After the dough has risen turn it out onto a work surface. Cut the dough into two equal pieces and shape them into round or oval loaves; place the loaves on a baking tray that has been lightly dusted with cornmeal. Loosely cover the dough with plastic wrap or a damp cloth and let it rise for 1-2 hours.
After the loaves have risen brush them with an egg that has been diluted with a couple of tablespoons of water; slash the tops with a sharp knife. Bake the bread for approximately 45 minutes, or until a wooden skewer inserted into the bread comes out clean and they sound hollow when tapped on. Remove the bread from the oven place it on a wire cooling rack and allow it to cool for a 30 minutes before slicing.