set path to jquery.cookie
save the token key into a cookie when authenticated