Fixed local logout on error