RE-EDIT:
Based on the comment provided i can see the problem would be with your following piece of code:
.and()
.logout().logoutUrl("/")
Based on that code setup it means every time you go to your homepage/index page it will return http:///login?logout as per your problem.
I'm going to assume that you want to redirect to homepage/index page so therefore i present you this fix:
.and()
.logout()
.logoutSuccessUrl("/");
If this doesn't work please advise and i'll assist you further, otherwise accepting my answer will be thank you enough :).