if (is_null($storedPassword)) {
            throw new InvalidArgumentException("Encrypted password missing"); 
        }