Fix renew stale session + add --clear-cache option

The problems in #207 are probably caused by not removing the stale session properly.
Also, for convenience, I've added a --clear-cache option.