Added /api/identity endpoint.

This should resolve #643.