Added refresh_ui_flag method to allow for purging cache on homepage if a submission has been made
Consuming refresh_ui_flag in ui
Refactoring out csrf token extraction step