Login route can't be customized

Hi, I encountered a problem while trying to create my Login page.
When I specify the login route as “/login” everything works my application can redirect me to /login?error in case of problem
but if I specify “/panel/login” as the route it stops working

Here is my Security config:

@Panel
@Configuration
@EnableWebSecurity
class VaadinSecurityConfiguration: VaadinWebSecurity() {
    override fun configure(http: HttpSecurity?) {
        super.configure(http)
        this.setLoginView(http, LoginView::class.java)
    }

    @Bean
    fun users(): UserDetailsService {
        val admin = User.builder()
            .username("admin")
            .password("root")
            .roles("USER", "ADMIN")
            .build()

        return InMemoryUserDetailsManager(admin)
    }
}

image.png

the path works when I type it but in case of failure vaadin won’t redirect me to this url
image.png

and how can I redirect the user right after login in?

Seems to work for me with a V24 starter. I’ll attach the java classes I have, maybe you can spot the difference.
@AnnonymousAllowed missing from LoginView maybe?

LoginView.java (1.63 KB)