added code to react on the click of buttons in accountWidget