auth: add missing functionality to login.js