Use secure session cookies on SSL connection (fixes #210, part 2)