saving sidebar status in cookies