added session management and normalize email utility for document id