Closing session on authentication error