fix login error caused by local storage