Saving userid to the localStorage instead of cookies.