[APF-1231] move login.js do webapp to make it work also in an archetype