fixed #41
closes #39
added cookie for session