added login event and its lisner in main.js