Make sure all the places where the details of your country are stored all identify one same country.
For us it's the UK and for some reason everytime we wanted to download an app we found ourselves in the US store and needed to change the country region which meant we needed to verify credit card details that then resulted in the session timed out 5107 error >:/
We blamed a first time laptop sync for the settings change but who knows.
Anyway after data loss because of a rewipe, tears & grief this finally worked ...
Open up the Appstore & scroll down to the 'Apple ID' button, click, sign out & close Appstore.
Now clear all your iPad hisory by bringing up the bottom bar, holding an icon until they all wobble then tapping the - on each file which closes it.
Check your settings in iCloud and change the country details as necessary - even if it's been disabled.
Settings > iCloud > Account > Payment information > ensure card details are 'None' & Billing address has correct country shown.
Now check your online Apple ID. https://appleid.apple.com Login and at the very botom right hand corner of the page select the appropriate country, save & close the browser.
Try logging into the Appstore again and see if it takes you to the correct store & allows you to download the free apps .
I hope this helps, today's been a total nightmare for us