Preheat oven to 350°F Grease and flour an 8x8" square baking pan.
Bring stout to a boil in a large saucepan. Off heat, stir in baking soda; it will foam up. When foam subsides, add molasses and both sugars; stir until dissolved.
In a large bowl, whisk together flour, ground ginger, baking powder, salt, cinnamon and pepper.
Whisk eggs, oil and grated ginger into stout mixture.
Whisk wet mixture into flour mixture in thirds, mixing thoroughly after each addition. Pour batter into pan and bake 35-45 min, until a toothpick inserted in the middle comes out clean.
Cool cake in pan on wire rack for 1 ½ hours. Cut into squares.
