Fixing authentication code in example