Improved configure script
Better cookie handling. SSL cleanup completed