8.2 implemented sign-in/out functions