fixing bug with BadCredentialsException in login form