Updated analysis_monitor.js to automatically redirect when error state is set on analysis.