Use secure login cookies on SSL connections (fixes #210, part 1)