Fix toggling between user and cog icon in navbar