Only clear the session variables related to login. The validation depends on session variables to work properly.
Specifically list only the session variables associated with login in the clear session variable server behavior and then it won't interfere with the validation.