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 :

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

    public void configure(HttpSecurity http) throws Exception {
                .antMatchers("/", "/login", "/logout", "/error","/SMS").permitAll()
                .antMatchers("/css/**", "/modul/**", "/js/**").permitAll()
                .antMatchers(HttpMethod.POST, "/allCompany").permitAll()
                .antMatchers(HttpMethod.POST, "/SMS").permitAll()


Source: AngularJS