Tell us what you are trying to do?
We are using per-domain config in our site. When a customer logged in, always redirected to the default language base URL instead of the used one.
The wordpress address in the settings is well defined.
Do not use any plugin or hook for redirect.
1) Please update all WPML plugins to the latest version by going to the Plugins → Add New page, click the Commercial tab, and then click Check for updates.