Simplified getCookie method (closes #1372)