I am using yii2-user module on top of the standard Yii2 advanced demo.
Yii2-user provides it's own login function at /user/security/login and linking directly to that works perfectly.
However the advanced demo overides that and directs the call to /user/login probably using the internal routes but I cant track down where that is happening.
I need to tell my Yii2 site not to chip in its own login ( which I have deleted ) and to retain the route to /user/security/login.
config file is directing user to the dektrium yii2-user module and it all seems to be working, it's just the default action into the backend page that reroutes to user/login when a visitor is a guest instead of a registered admin.
Backend has its own configuration, you should simply modify user component
loginUrl
inbackend/config/main.php
.