login error and validate