close app on main page closed