Fixed login error handle