Login form in Membership 2 Pro redirects to 404 when using 2013 theme

When on site theme 2013 is used then Membership 2 Pro redirects to 404 error page and user is not logged in.
Issue is gone when theme is changed to 2017 (there is no more redirects, user is logged in).

We would still like to use 2013 theme if possible.