Hi, I faced a similar issue when using deeplink in combination with login location.
Instead of configuring loginlocation, I tried to customize the login.html that came along with deeplink module to mock that as our normal login screen.
The issue was, I could not figure out how to properly configure the loginlocation, so the page redirection can happen properly.
I am not sure, if you can customize the login screen for your case.
Did you implement role Based Login then, you have to add start deep link microflow to the Role-based login , so that it will check for whether the URL has to hit the app or a specific page.