Authentication and MongoDB interaction set up.