Added autorefresh token feature and more REST API methods