update before napa
update on login.js so it works on backend instead of frontend