handling default refreshtoken lifetime, some fixes, cleanups...