add id='main-content' to div
add functions to support loading gif and display msg when success or error