Fix the logout functionality.
Note where the cookie setting needs to be done correctly.  When this is not done correctly, the cookie is only passed into the authentication path, because that is the path that originally set it.
Finished the cookie / authentication bug hunt.  It was due to not specifying all the cookie parameters during the set calls.