fixing SecurityConfig and CustomAuthenticationProvider