Idoc coach reports

CSRF and other small bug fixes. Changes to frontend JS reverted.