Improved getToken with callback. Newtoken now actually gets a new token. Also if listing rooms with invalid token, then fetch a new token. WIP.
Bugfix: token expire now recalced to milliseconds to match Date.getTime(), thus validto match should now be correct.
refactoring.
refactoring adds prepToken func. Also trying to sync rooms, but WIP and quite messy.