added console messages to the controllers to debug js errors