added back default timeouts and fixed refresh token check