added modal dialogs
added cookie functions