spring security url redirection

i have problme when i go on my localhost page it is automaticli redirect to te url:/login?logout.
I have this error when i add spring spring security in myn application
my frontend is in angularjs
this is the code of my spring security :

 @EnableOAuth2Sso
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class WebSecurityconfig extends WebSecurityConfigurerAdapter {
    @Autowired
    private AADAuthenticationFilter aadAuthenticationFilter;

    @Override
    public void configure(HttpSecurity http) throws Exception {
        http
            .authorizeRequests()
                .antMatchers("/", "/login", "/logout", "/error","/SMS").permitAll()
                .antMatchers("/css/**", "/modul/**", "/js/**").permitAll()
                .antMatchers(HttpMethod.POST, "/allCompany").permitAll()
                .antMatchers(HttpMethod.POST, "/SMS").permitAll()
            .and()
                .logout().logoutUrl("/").permitAll()
            .and()
                .csrf().disable();
    }

}

Source: AngularJS