replace cookie with server call

added post request to server, in place of saving a cookie.