close frontend when connected