Corrected database connection for Frontend