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:

class VaadinSecurityConfiguration: VaadinWebSecurity() {
    override fun configure(http: HttpSecurity?) {
        this.setLoginView(http, LoginView::class.java)

    fun users(): UserDetailsService {
        val admin = User.builder()
            .roles("USER", "ADMIN")

        return InMemoryUserDetailsManager(admin)


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

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)