added a login listener