Weird. Still doesn't work...
The cookie is only one parameter, ndn_session_id_v3, correct? It's being stored correctly in the cookie file, but when I go to grab a specific page of the admin panel (https://panel.dreamhost.com/index.cgi?tree=mail.addresses&), it shows me as not being logged in.
See anything wrong with my code? Would you be willing to host your (working) script on your server as a *.phps file?