built a sign in sign out function