first attempt at (de)serialization of credentials, may have bugs
merge current work on serialization and getting tickets