working login/logout with curl