Updated redirect url_for to main_index