Refactor mongodb connectivity and store gdrive files and access token to database