Hi Harshal,
This is a default behavior to override user's existing cart with anonymous visitor when he logs in. This can be customized, please refer to shopping cart customization docs. You need to implement your desired logic in custom implementation of ICurrentShoppingCartService interface. To start with something, look at the decompiled default Kentico implementation CurrentShoppingCartService, note HandleCandidateCart method there, my best guess would be that you need to merge two cards somewhere here. And to merge carts you can use the following method:
ShoppingCartInfoProvider.CopyShoppingCartItems(sourceCart, destinationCard);