By default when cookies are set - they are limited to the subdomain that set them - and won't be passed to other subdomains.
Because you are 'crossing' subdomains - the cookie by default isn't going to be shared.
CPG has a config setting that should allow you to override this behavior.
Login using the real URL (adding the index.php).
In config - expand the 'Cookie Settings' and set the 'Cookie path'.
In your case I would expect it should be 'demmel.com' (without quotes) - which will allow the cookie to be sent to www and pics subdomains (and any others).
I haven't tested this value - incorrect values will prevent you from logging in.
You can reset the value directly in the database with SQL like:
UPDATE `cpg_config` SET `value` = '/' WHERE `name` = 'cookie_path';
(change 'cpg_' to your cpg table prefix.)
A reference to how php sets cookies:http://php.net/manual/en/function.setcookie.php
The value of 'cookie_path' is sent as the domain name.
As an alternative - you could actually move the gallery to the 'pics' subdomain - rather than pointing across to www.
This would confine the use of the cookie to the pics subdomain - and the default CPG value of '/' for cookie_path will work.
(The same subdomain would be setting and using the cookie).