added login event hander