modify bugs when user login and logout