Refreshing components after user login/logout refactored