Joomla has something for this:
docs.joomla.org/how_do_you_redirect_user..._successful_login%3F
Note that if you have the login activated during the checkout process, I would recommend you test it after setting up the redirection in order to make sure it doesn't conflict together and that customers can properly proceed to the checkout after their login there.