corrected implementation of login_check, and encoder for entity user provider