Using mixed HTTP(S) sessions securely and without loss of session data