Buttons do not invoke rerun of script

Setting a session state based on button clicks should help.