Added logic to redirect to cart when logging in