add cookies, fixed log-in problem