correct cookie handling and show/hide of login states