login.js now has an own eventemitter (useful if you have more indipendent instances)