added eventListener in order to fire off authentication