update restauth.js