adding sign-in and sign-out functions