is there a way to block logged user to access login and register pages? I tried something like this
.antMatchers("/login").not().hasAnyRole("USER&q