Update main ui when login and logout