Added new function getCookies and removed deprecated checkLogin function