Shopping cart is not getting cleared when logged out

Shopping cart is not getting cleared when logged out. If I logout and login with a different credential still the cart data is persisted.

Litium version: 7.7.0

Yes, that is the default behavior. You can change LoginController so that it also clears the cart when a user logs out.