Make important security entities Serializable
Merge pull request #3070 from PhantomYdn/fix-serializable-in-security

Make important security entities Serializable