Identity management

It is a work in progress to #122.