added session handling, minor ui improvements