moved logic to store language cookie to serverside