Fixed an invalid memory access when dumping logs

When a client attempts to logout, the gateway removes its record from the global client list by calling `client_list_delete`, subsequent access to `client->ip`, `client->mac` and `client->token` are all invalid and may lead to a crash.