Use pickle to serialize and deserialize authentication messages