Bugfix in auth.js