Because you wrote above that if the slash was empty, it would first go to the dashboard and ignore the login, usually the redirection to the login is done with guards or check in your dashboard component and not in route.js