fix authenticate for controllers and fix recalc_item.js