Better error handling of ajax errors and responses on main index.  Handle messages returned by ajax calls in addition to errors