Smart contracts for identity and access control