add listener to loginCtrl