fixed bug in user.js and events.js