Completed code up to Exercises in the User Authentication chapter