Modifed cookie check method.
Adding the renew cookie expire time method.