top bar was not getting updated properly after logout