fix in CustomAuthenticationProvider