makes WIP pull request
subtracts safety margin from expiry_date
Merge pull request #1 from en30/bug/invalid-credentials

Invalid Credentials error every 1 hour