Ubercart: maintaining cart content after user login
The feature looking for is default ubercart behavior. You may have missed with some of your custom code may be with hook_user Check that to see what happens and try disable any custom modules.