You can use the Save Cart Details In Database server behavior to save the cart contents into a "ShoppingCart" table and then retrieve the cart contents from that table when a user logs in.
This is something I could help with in a premier support ticket.