use main.event instead of signin and signout event