modified code: when and where should we push a message to user after they scan logined