1. Modify the javascript code in order to accommodate to the authentication changes.