fixed problem with cookies, need to clean up tho