There isn't a way to do it with the @page directive. This isn't possible because @page "/" turns behind the scene into the [Route("/")] attribute and parameters of an attribut have to be constants.
A very cumbersome way to achieve this but also the single one i could imagine is to implement something like custom routing. You could check inside of Router.razor whether the request path matches the configured path and render the login page if so but as I already said this a very cumbersome. Genraley isn't it planned at all to do routing dynamicly like this.