Added authentication to sample. On the way of Chapter 12.