coulix,
two options (and then I'll promise I will add to my list of things to do a way to better manage this isse) :
1) cache the account object, but keep track of usage. After 20 minutes of inactivity delete the current object and create a new one
2) catch the error (that should say something like the request is not authenticated) and again delete the current object and create a new one
there may be a third option available, but I confess I never tried to see what really happen, but I am assuming that the authentication token we are using expires after some time passes with no requests going to the server. If this is true, the other option is to have a timer that kicks in every 20 minutes or so and does a REST request. This should be enough to keep the authentication token alive.
Please give it a try and let me know what the results are. Again, there is definitively something we can do to make your life a little easier, and I'll keep it in mind and sneak something in on one of the next iterations of the client SDK.