Added ajax error messages

Fixes #6