Chapter 11: complete. Added authentication