Add an event listener to check authorization
Merge origin/master