The first /login
is being matched from the Controller name, and the second /login
is being matched from the Action name (the sub).
You either need to move the entire login
sub into your Root controller, or move its logic into the existing default
handler. Personally, I prefer to put actions like login and logout into the Root controller. They're unlikely to have anything else chained to them or dependent on them. Does Login.pm have any other actions or methods?
The missing CSS styling is likely to be an issue of relative paths in your login.html, or the configuration of static resources in your main program. You should be able to debug that one with your browser's Dev Tools.