Ref #3243: remove deprecation warning for UserDetailsService

Also clear the session in case of a login error and import.
Merge pull request #115 from fanf/arc_3243/dev/remove_deprecation_warning_UserDetailsService

Ref #3243: remove deprecation warning for UserDetailsService