Chapter 8 - Added registration and logout