Refactor app.ts
Update user list when the user login/logout