Spring security 4.x login redirects to '.../favicon' instead of expected URL
<p>I have Spring Security java configuration as </p>

<pre><code>@Configuration
@EnableWebSecurity
public class BlogWebSecurityConfigurer extends WebSecurityConfigurerAdapter {
     @Override
        public void configure(WebSecurity web) throws Exception {
            web.ignoring().antMatchers("/resources/**");
        }

        @Override
        protected void configure(HttpSecurity http) throws Exception {
            http
                .authorizeRequests()
                    .antMatchers("/").permitAll()                   
                    .antMatchers("/resources/**").permitAll()                                       
                    .antMatchers("/detail/**").permitAll()
                    .antMatchers("/post/**").hasRole("ADMIN")
                    .anyRequest().authenticated()
                    .and()
                .formLogin()
                    .loginPage("/login").defaultSuccessUrl("/")
                    .permitAll()
                    .and()
                .logout()
                    .logoutUrl("/logout");
        }

        @Autowired
        public void registerGlobal(AuthenticationManagerBuilder auth) throws Exception {
          auth
              .inMemoryAuthentication()
                .withUser("admin")
                .password("admin")
                .roles("USER", "ADMIN");
          }

}
</code></pre>

<p>and my login form is </p>

<pre><code>&lt;form name='login' action="&lt;spring:url value='/login'/&gt;" method='POST'&gt;
        &lt;input class="input-field" type='text' name='username' placeholder="admin name"&gt;
        &lt;input class="input-field" type='password' name='password' placeholder="admin password" /&gt;&lt;br&gt;
        &lt;input name="submit" type="submit" value="Login" /&gt;           
        &lt;input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" /&gt;
    &lt;/form&gt;
</code></pre>

<p>LoginLogoutController is</p>

<pre><code>@Controller
public class LoginLogoutController {
    @Autowired
    private BlogService serviceImplementation;

    @RequestMapping(value = "/login", method = RequestMethod.GET)
    public String adminHome() {     
        return "login";
    }

    @RequestMapping(value = "/login", method = RequestMethod.POST)
    public String adminLogin(Model model) {
        model.addAttribute("posts", serviceImplementation.getAllPosts());
        return "redirect:/";
    }

    @RequestMapping(value = "/logout", method = RequestMethod.GET)
    public String logoutPage(HttpServletRequest request,
            HttpServletResponse response) {
        Authentication auth = SecurityContextHolder.getContext()
                .getAuthentication();
        if (auth != null) {
            new SecurityContextLogoutHandler().logout(request, response, auth);
        }
        return "redirect:/";
    }
}
</code></pre>

<p>all things work perfectly but when I hit Login button it takes me to </p>

<pre><code>localhost:8080/app/favicon.jpg
</code></pre>

<p>and a 404/ not found error after this when I hit back button of browser I see my self as logged in the app.
How can I fix this bug so that Security not take to /favicon.jpg request any suggestions please. </p>