log in log out client side