Added secure server handling