implemented better session handling.