Fixed auth_setCookie handling