add convencience function
move cookie handling to own file