Negotiate token auth with server and support logout