I think it's related to Authy plugin, which adds time-based token authentication after I enter login details. What happens is this:
1. I visit login page domain.com/login-custom-slug
2. Enter login, success.
3. Authy authentication, I enter it. success.
4. Redirected to 404 page with following url:
Looks like your plugin isn't able to handle redirects when Authy is added.