Ajax fixes for validation and navigation. Fixes #21, #34, #40

@ereng, please review this branch. It fixes validation problems i.e.:

- error messages are shown where set (in controller) eg. name is unique and required
- navigation is redirected to the appropriate page after an action

@briankip - problem of the $errors was caused by javascript. The forms were calling a custom function "formsubmit". I've changed this to the standard in-built "submit".