chapter4 user registration and management