Implement logging out.