Fix login error issue