fixed bug with js file trying to authenticate