use previous reference in login js
updates to 2.2.2