fix logout button and double triggered connection