Setting up authentication of user.