Fix remote login detection logic.