Updated server to use PublicIdentity where appropriate