beautify auth.js