added user authentication following ch 6 of hartl