controllers refactor to handle identities