adding sign in changes from chapter 8
merged back to main chapter 8 changes